Example #1
0
 /**
  * @param array $config
  * 
  * @throws App_Exception_StoragePathDoesNotExists
  * @throws App_Exception_StoragePathIsNotSpecified
  * @throws App_Exception_StoragePathIsNotWritable
  */
 public static function setConfig(array $config = [])
 {
     if (empty($config['path'])) {
         throw new App_Exception_StoragePathIsNotSpecified();
     }
     if (!file_exists($config['path'])) {
         throw new App_Exception_StoragePathDoesNotExists($config['path']);
     }
     if (!is_writable($config['path'])) {
         throw new App_Exception_StoragePathIsNotWritable($config['path']);
     }
     self::$_config = $config;
 }