Gc\View\Helper\Script::plugin PHP Method

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
    public function plugin($name, array $options = null)
    {
        return $this->pluginManager->get($name, $options);
    }

Usage Example

Beispiel #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testPlugin()
 {
     $this->assertInstanceOf('Zend\\Mvc\\Controller\\Plugin\\Redirect', $this->object->plugin('redirect'));
 }