PHP Class PluginEndpoints\Router

Show file Open project: dannyvankooten/plugin-endpoints Class Usage Examples

Protected Properties

Property Type Description
$endpoints array

Public Methods

Method Description
__construct ( ) Constructor
add_filters ( ) : boolean If one of the registered endpoints is selected, add the required filters.
get_requested_endpoint ( ) : Endpoint | null
register_endpoint ( string $url, array $plugins = [] )

Method Details

__construct() public method

Constructor
public __construct ( )

add_filters() public method

If one of the registered endpoints is selected, add the required filters.
public add_filters ( ) : boolean
return boolean

get_requested_endpoint() public method

public get_requested_endpoint ( ) : Endpoint | null
return Endpoint | null

register_endpoint() public method

public register_endpoint ( string $url, array $plugins = [] )
$url string The leading URL for this endpoint
$plugins array Array of enabled plugin slugs for this endpoint

Property Details

$endpoints protected property

protected array $endpoints
return array