PHP Class Gc\Module\AbstractPlugin

Datei anzeigen Open project: gotcms/gotcms

Protected Properties

Property Type Description
$pluginParameters array Script parameter
$renderer Gc\View\Renderer Renderer

Public Methods

Method Description
__call ( string $method, array $params ) : mixed Method overloading: return/call plugins
addPath ( string $dir ) : AbstractPlugin Add path in Zend\View\Resolver\TemplatePathStack
getParam ( string $name ) : mixed Returns param from name.
getRequest ( ) : Zend\Http\PhpEnvironment\Request Get Http Request instance.
getResponse ( ) : Zend\Http\PhpEnvironment\Response Get Http Response instance.
getServiceLocator ( ) : Zend\ServiceManager\ServiceManager Get service locator
init ( ) : void Initialize
plugin ( string $name, array $options = null ) : mixed Get plugin instance
render ( string $name, array $data = [] ) : string Render template
setParam ( string $key, string $value ) : AbstractPlugin Set params
setParams ( array $array ) : AbstractPlugin Set params

Method Details

__call() public method

If the plugin is a functor, call it, passing the parameters provided. Otherwise, return the plugin instance.
public __call ( string $method, array $params ) : mixed
$method string Method
$params array Parameters
return mixed

addPath() public method

Add path in Zend\View\Resolver\TemplatePathStack
public addPath ( string $dir ) : AbstractPlugin
$dir string Directory
return AbstractPlugin

getParam() public method

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

getRequest() public method

Get Http Request instance.
public getRequest ( ) : Zend\Http\PhpEnvironment\Request
return Zend\Http\PhpEnvironment\Request

getResponse() public method

Get Http Response instance.
public getResponse ( ) : Zend\Http\PhpEnvironment\Response
return Zend\Http\PhpEnvironment\Response

getServiceLocator() public method

Get service locator
public getServiceLocator ( ) : Zend\ServiceManager\ServiceManager
return Zend\ServiceManager\ServiceManager

init() public method

Initialize
public init ( ) : void
return void

plugin() public method

Get plugin instance
public plugin ( string $name, array $options = null ) : mixed
$name string Name of plugin to return
$options array Options to pass to plugin constructor (if not already instantiated)
return mixed

render() public method

Render template
public render ( string $name, array $data = [] ) : string
$name string Name
$data array Data
return string

setParam() public method

Set params
public setParam ( string $key, string $value ) : AbstractPlugin
$key string Key
$value string Value
return AbstractPlugin

setParams() public method

Set params
public setParams ( array $array ) : AbstractPlugin
$array array List of parameters
return AbstractPlugin

Property Details

$pluginParameters protected_oe property

Script parameter
protected array $pluginParameters
return array

$renderer protected_oe property

Renderer
protected Renderer,Gc\View $renderer
return Gc\View\Renderer