getType() public method

Get plugin type.
public getType ( ) : string
return string Plugin type.
示例#1
0
 /**
  * @dataProvider dataProvider
  */
 public function testGetType(Plugin $p)
 {
     $this->assertSame('pType', $p->getType());
 }
示例#2
0
 /**
  * Register a plugin for the template engine.
  *
  * @param Plugin $plugin
  *
  * @throws \Exception|SmartyException
  * @return void
  */
 public function registerPlugin(Plugin $plugin)
 {
     try {
         $this->smarty->registerPlugin($plugin->getType(), $plugin->getName(), $plugin->getCallbackFunction(), $plugin->getAttribute('Cachable', true), $plugin->getAttribute('CacheAttr', null));
     } catch (\SmartyException $e) {
         throw new SmartyException($e);
     }
 }