PHP Class Essence\Provider\Collection

显示文件 Open project: benjamminf/craft-embedded-assets Class Usage Examples

Protected Properties

Property Type Description
$_Container Essence\Di\Container Dependency injection container.

Public Methods

Method Description
__construct ( Container $Container ) Constructor.
hasProvider ( string $url ) : boolean Tells if a provider can handle the given url.
providers ( string $url ) : array Finds providers of the given url.

Protected Methods

Method Description
_matches ( string | callable $filter, string $url ) : boolean Tells if an URL matches a filter.

Method Details

__construct() public method

Constructor.
public __construct ( Container $Container )
$Container Essence\Di\Container Dependency injection container used to build providers.

_matches() protected method

Tells if an URL matches a filter.
protected _matches ( string | callable $filter, string $url ) : boolean
$filter string | callable Regex or callback to filter URL.
$url string URL to filter.
return boolean Whether the URL matches the filter or not.

hasProvider() public method

Tells if a provider can handle the given url.
public hasProvider ( string $url ) : boolean
$url string An url which may be extracted.
return boolean The url provider if any, otherwise null.

providers() public method

Finds providers of the given url.
public providers ( string $url ) : array
$url string An url which may be extracted.
return array An array of Essence\Provider.

Property Details

$_Container protected_oe property

Dependency injection container.
protected Container,Essence\Di $_Container
return Essence\Di\Container