PHP Class Essence\Provider\Collection

Afficher le fichier Open project: benjamminf/craft-embedded-assets Class Usage Examples

Protected Properties

Свойство Type Description
$_Container Essence\Di\Container Dependency injection container.

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

__construct() public méthode

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

_matches() protected méthode

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.
Résultat boolean Whether the URL matches the filter or not.

hasProvider() public méthode

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

providers() public méthode

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

Property Details

$_Container protected_oe property

Dependency injection container.
protected Container,Essence\Di $_Container
Résultat Essence\Di\Container