PHP Класс PPI\Framework\Module\AbstractModule

Автор: Paul Dragoonis ([email protected])
Наследование: implements PPI\Framework\Module\ModuleInterface, implements Zend\ModuleManager\Feature\ConfigProviderInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$config null
$configLoader null | PPI\Framework\Config\ConfigLoader Configuration loader.
$name The Module name.
$reflected ReflectionObject
$routes null
$services null

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

getCommandsPath() публичный Метод

Override this in your child module if it differs from this default convention.
public getCommandsPath ( ) : string
Результат string

getConfig() публичный Метод

Returns configuration to merge with application configuration.
public getConfig ( ) : array | Traversable
Результат array | Traversable

getConfigLoader() защищенный Метод

Returns a ConfigLoader instance.
protected getConfigLoader ( ) : ConfigLoader
Результат PPI\Framework\Config\ConfigLoader

getName() публичный Метод

Returns the module name. Defaults to the module namespace stripped of backslashes.
public getName ( ) : string
Результат string The Module name

getNamespace() публичный Метод

Gets the Module namespace.
public getNamespace ( ) : string
Результат string The Module namespace

getPath() публичный Метод

Gets the Module directory path.
public getPath ( ) : string
Результат string The Module absolute path

getService() публичный Метод

Get a particular service.
public getService ( string $serviceName ) : mixed
$serviceName string
Результат mixed

getServices() публичный Метод

Get the services.
public getServices ( ) : array
Результат array

loadAuraRoutes() защищенный Метод

protected loadAuraRoutes ( string $path ) : Aura\Router\Router
$path string
Результат Aura\Router\Router

loadConfig() публичный Метод

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
Результат array

loadFastRouteRoutes() защищенный Метод

protected loadFastRouteRoutes ( $path ) : PPI\FastRoute\Wrapper\FastRouteWrapper
$path
Результат PPI\FastRoute\Wrapper\FastRouteWrapper

loadLaravelRoutes() защищенный Метод

protected loadLaravelRoutes ( string $path ) : Aura\Router\Router
$path string
Результат Aura\Router\Router

loadSymfonyRoutes() защищенный Метод

Load up our routes.
protected loadSymfonyRoutes ( string $path ) : RouteCollection
$path string
Результат Symfony\Component\Routing\RouteCollection

loadYamlConfig() защищенный Метод

Load up our config results from the specific yaml file.
Устаревший: since version 2.1, to be removed in 2.2. Use "loadConfig()" instead.
protected loadYamlConfig ( string $path ) : array
$path string
Результат array

loadYamlRoutes() защищенный Метод

Load up our routes.
Устаревший: Please use loadSymfonyRoutes instead
protected loadYamlRoutes ( string $path ) : RouteCollection
$path string
Результат Symfony\Component\Routing\RouteCollection

mergeConfig() публичный Метод

Loads and merges the configuration.
public mergeConfig ( mixed $resources ) : array
$resources mixed
Результат array

registerCommands() публичный Метод

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() публичный Метод

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

setServices() публичный Метод

Set services for our module.
public setServices ( string $services ) : Module
$services string
Результат Module

Описание свойств

$config защищенное свойство

protected null $config
Результат null

$configLoader защищенное свойство

Configuration loader.
protected null|ConfigLoader,PPI\Framework\Config $configLoader
Результат null | PPI\Framework\Config\ConfigLoader

$name защищенное свойство

The Module name.
protected $name

$reflected защищенное свойство

protected ReflectionObject $reflected
Результат ReflectionObject

$routes защищенное свойство

protected null $routes
Результат null

$services защищенное свойство

protected null $services
Результат null