MagicFunctionProvider
class MagicFunctionProvider implements EventSubscriberInterface, ProviderInterface
This class manages the loading of API's using strict file+function naming conventions.
Methods
static array
getSubscribedEvents()
No description
__construct()
No description
array
invoke(array $apiRequest)
No description
array
getEntityNames(int $version)
No description
array
getActionNames(int $version, string $entity)
No description
array
resolve(array $apiRequest)
Look up the implementation for a given API request.
string
getFunctionName(string $entity, string $action, int $version)
Determine the function name for a given API request.
loadEntity(string $entity, int $version)
Load/require all files related to an entity.
Details
at line 42
static array
getSubscribedEvents()
at line 57
__construct()
at line 65
onApiResolve(ResolveEvent $event)
at line 81
array
invoke(array $apiRequest)
at line 111
array
getEntityNames(int $version)
at line 154
array
getActionNames(int $version, string $entity)
at line 192
protected array
resolve(array $apiRequest)
Look up the implementation for a given API request.
at line 263
protected string
getFunctionName(string $entity, string $action, int $version)
Determine the function name for a given API request.
at line 279
protected
loadEntity(string $entity, int $version)
Load/require all files related to an entity.
This should not normally be called because it's does a file-system scan; it's only appropriate when introspection is really required (eg for "getActions").