PHP Class Gc\View\Helper\ModulePlugin

Inheritance: extends Zend\View\Helper\AbstractHelper
Mostra file Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Property Type Description
$camelCaseNames array Lookup for camel case names.
$instances array Registered services and cached values
$modulePluginParameters array Script parameter

Public Methods

Method Description
__invoke ( string $moduleName, string $pluginName, array $params = [] ) : mixed Execute plugin module.
canCreate ( string | array $moduleName, string $pluginName = null ) : boolean Determine if we can create an instance.
create ( string $moduleName, string $pluginName = null ) : boolean | AbstractPlugin Create plugin
get ( string $moduleName, string $pluginName ) : object | array Retrieve a registered instance
getParam ( string $name ) : mixed Returns param from name.
has ( string $moduleName, string $pluginName = null ) : boolean Check if plugin exists
validatePlugin ( mixed $plugin ) : boolean Validate the plugin

Protected Methods

Method Description
toCamelCase ( string $name ) : string Canonicalize name

Method Details

__invoke() public method

Execute plugin module.
public __invoke ( string $moduleName, string $pluginName, array $params = [] ) : mixed
$moduleName string Module name
$pluginName string Plugin name
$params array Parameters
return mixed

canCreate() public method

Determine if we can create an instance.
public canCreate ( string | array $moduleName, string $pluginName = null ) : boolean
$moduleName string | array Module name
$pluginName string Plugin name
return boolean

create() public method

Create plugin
public create ( string $moduleName, string $pluginName = null ) : boolean | AbstractPlugin
$moduleName string Module name
$pluginName string Plugin name
return boolean | Gc\Module\AbstractPlugin

get() public method

Retrieve a registered instance
public get ( string $moduleName, string $pluginName ) : object | array
$moduleName string Module name
$pluginName string Plugin name
return object | array

getParam() public method

Returns param from name.
public getParam ( string $name ) : mixed
$name string Parameter name
return mixed

has() public method

Check if plugin exists
public has ( string $moduleName, string $pluginName = null ) : boolean
$moduleName string Module name
$pluginName string Plugin name
return boolean

toCamelCase() protected method

Canonicalize name
protected toCamelCase ( string $name ) : string
$name string Name
return string

validatePlugin() public method

Any plugin is considered valid in this context.
public validatePlugin ( mixed $plugin ) : boolean
$plugin mixed Plugin
return boolean

Property Details

$camelCaseNames protected_oe property

Lookup for camel case names.
protected array $camelCaseNames
return array

$instances protected_oe property

Registered services and cached values
protected array $instances
return array

$modulePluginParameters protected_oe property

Script parameter
protected array $modulePluginParameters
return array