public function __construct(array $config = array()) { parent::__construct($config); if (!isset($config['cache_path'])) { throw new \InvalidArgumentException("The Cache plugin requires to specify the 'cache_path' option"); } $this->setCachePath($config['cache_path']); if (isset($config['cache_expiration'])) { $this->setCacheExpiration($config['cache_expiration']); } if (isset($config['cache_extension'])) { $this->setCacheExtension($config['cache_extension']); } }
public function addPlugin(AbstractPlugin $plugin) { $this->plugins[$plugin->getName()] = $plugin; }