Phergie_Plugin_Handler::setAutoload PHP Method

setAutoload() public method

Sets a flag used to determine whether plugins should be loaded automatically if they have not been explicitly loaded.
public setAutoload ( boolean $flag = true ) : Phergie_Plugin_Handler
$flag boolean TRUE to have plugins autoload (default), FALSE otherwise
return Phergie_Plugin_Handler Provides a fluent interface.
    public function setAutoload($flag = true)
    {
        $this->autoload = $flag;
        return $this;
    }

Usage Example

示例#1
0
 /**
  * Tests adding plugin paths via configuration.
  *
  * @return void
  */
 public function testAddPluginPathsViaConfiguration()
 {
     $dir = dirname(__FILE__);
     $prefix = 'Phergie_Plugin_';
     $this->settings['plugins.paths'] = array($dir => $prefix);
     // Reinitialize the handler so the configuration change takes effect
     // within the constructor
     $this->handler = new Phergie_Plugin_Handler($this->config, $this->events);
     $this->handler->setAutoload(true);
     $this->handler->getPlugin('Mock');
 }
All Usage Examples Of Phergie_Plugin_Handler::setAutoload