PHP Class PPI\Framework\Module\AbstractModule

Author: Paul Dragoonis ([email protected])
Inheritance: implements PPI\Framework\Module\ModuleInterface, implements Zend\ModuleManager\Feature\ConfigProviderInterface
Afficher le fichier Open project: ppi/framework

Protected Properties

Свойство Type Description
$config null
$configLoader null | PPI\Framework\Config\ConfigLoader Configuration loader.
$name The Module name.
$reflected ReflectionObject
$routes null
$services null

Méthodes publiques

Méthode Description
getCommandsPath ( ) : string Returns the default location of where Command classes are registered.
getConfig ( ) : array | Traversable Returns configuration to merge with application configuration.
getName ( ) : string Returns the module name. Defaults to the module namespace stripped of backslashes.
getNamespace ( ) : string Gets the Module namespace.
getPath ( ) : string Gets the Module directory path.
getService ( string $serviceName ) : mixed Get a particular service.
getServices ( ) : array Get the services.
loadConfig ( string $resource, null | string $type = null ) : array Loads a configuration file (PHP, YAML) or PHP array.
mergeConfig ( mixed $resources ) : array Loads and merges the configuration.
registerCommands ( PPI\Framework\Console\Application $application ) Finds and registers Commands.
setName ( string $Name ) Set the module name.
setServices ( string $services ) : Module Set services for our module.

Méthodes protégées

Méthode Description
getConfigLoader ( ) : ConfigLoader Returns a ConfigLoader instance.
loadAuraRoutes ( string $path ) : Aura\Router\Router
loadFastRouteRoutes ( $path ) : PPI\FastRoute\Wrapper\FastRouteWrapper
loadLaravelRoutes ( string $path ) : Aura\Router\Router
loadSymfonyRoutes ( string $path ) : RouteCollection Load up our routes.
loadYamlConfig ( string $path ) : array Load up our config results from the specific yaml file.
loadYamlRoutes ( string $path ) : RouteCollection Load up our routes.

Method Details

getCommandsPath() public méthode

Override this in your child module if it differs from this default convention.
public getCommandsPath ( ) : string
Résultat string

getConfig() public méthode

Returns configuration to merge with application configuration.
public getConfig ( ) : array | Traversable
Résultat array | Traversable

getConfigLoader() protected méthode

Returns a ConfigLoader instance.
protected getConfigLoader ( ) : ConfigLoader
Résultat PPI\Framework\Config\ConfigLoader

getName() public méthode

Returns the module name. Defaults to the module namespace stripped of backslashes.
public getName ( ) : string
Résultat string The Module name

getNamespace() public méthode

Gets the Module namespace.
public getNamespace ( ) : string
Résultat string The Module namespace

getPath() public méthode

Gets the Module directory path.
public getPath ( ) : string
Résultat string The Module absolute path

getService() public méthode

Get a particular service.
public getService ( string $serviceName ) : mixed
$serviceName string
Résultat mixed

getServices() public méthode

Get the services.
public getServices ( ) : array
Résultat array

loadAuraRoutes() protected méthode

protected loadAuraRoutes ( string $path ) : Aura\Router\Router
$path string
Résultat Aura\Router\Router

loadConfig() public méthode

Loads a configuration file (PHP, YAML) or PHP array.
public loadConfig ( string $resource, null | string $type = null ) : array
$resource string The resource
$type null | string The resource type
Résultat array

loadFastRouteRoutes() protected méthode

protected loadFastRouteRoutes ( $path ) : PPI\FastRoute\Wrapper\FastRouteWrapper
$path
Résultat PPI\FastRoute\Wrapper\FastRouteWrapper

loadLaravelRoutes() protected méthode

protected loadLaravelRoutes ( string $path ) : Aura\Router\Router
$path string
Résultat Aura\Router\Router

loadSymfonyRoutes() protected méthode

Load up our routes.
protected loadSymfonyRoutes ( string $path ) : RouteCollection
$path string
Résultat Symfony\Component\Routing\RouteCollection

loadYamlConfig() protected méthode

Load up our config results from the specific yaml file.
Deprecation: since version 2.1, to be removed in 2.2. Use "loadConfig()" instead.
protected loadYamlConfig ( string $path ) : array
$path string
Résultat array

loadYamlRoutes() protected méthode

Load up our routes.
Deprecation: Please use loadSymfonyRoutes instead
protected loadYamlRoutes ( string $path ) : RouteCollection
$path string
Résultat Symfony\Component\Routing\RouteCollection

mergeConfig() public méthode

Loads and merges the configuration.
public mergeConfig ( mixed $resources ) : array
$resources mixed
Résultat array

registerCommands() public méthode

Override this method if your module commands do not follow the conventions: * Commands are in the 'Command' sub-directory * Commands extend PPI\Framework\Console\Command\AbstractCommand
public registerCommands ( PPI\Framework\Console\Application $application )
$application PPI\Framework\Console\Application An Application instance

setName() public méthode

Set the module name.
public setName ( string $Name )
$Name string

setServices() public méthode

Set services for our module.
public setServices ( string $services ) : Module
$services string
Résultat Module

Property Details

$config protected_oe property

protected null $config
Résultat null

$configLoader protected_oe property

Configuration loader.
protected null|ConfigLoader,PPI\Framework\Config $configLoader
Résultat null | PPI\Framework\Config\ConfigLoader

$name protected_oe property

The Module name.
protected $name

$reflected protected_oe property

protected ReflectionObject $reflected
Résultat ReflectionObject

$routes protected_oe property

protected null $routes
Résultat null

$services protected_oe property

protected null $services
Résultat null