예제 #1
0
파일: Cache.php 프로젝트: albertofem/wiser
 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']);
     }
 }
예제 #2
0
 public function addPlugin(AbstractPlugin $plugin)
 {
     $this->plugins[$plugin->getName()] = $plugin;
 }