__construct() public method

The param \c $basePath param is used to shorten the unique filename which is generated using the file real path.
public __construct ( string $cachePath, string $extension = '.cached.php', string $basePath = '' )
$cachePath string where to save the cache files
$extension string the extension of the cache file
$basePath string The base path from where the files come from
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->actsAs = array('FileStorage.UploadValidator' => array('localFile' => true, 'validate' => false, 'allowedExtensions' => array('aif', 'mid', 'midi', 'mka', 'mp1', 'mp2', 'mp3', 'mpa', 'wav', 'aac', 'flac', 'ogg', 'ra', 'raw', 'wma')));
 }
 /**
  * Constructs this MTimeProtectedFastFileStorage object.
  *
  * @param array $configuration
  *   An associated array, containing at least these keys (the rest are
  *   ignored):
  *   - directory: The directory where the files should be stored.
  *   - secret: A cryptographically hard to guess secret string.
  *   -bin. The storage bin. Multiple storage objects can be instantiated with
  *   the same configuration, but for different bins.
  */
 public function __construct(array $configuration)
 {
     parent::__construct($configuration);
     $this->secret = $configuration['secret'];
 }
示例#3
0
 /**
  * Provide either a file name or an SplFileInfo object referring to a file
  * 
  * @param SplFileInfo|string $file
  * @param int $timeToLive
  * @return void
  */
 public function __construct($file, $timeToLive = 3600)
 {
     parent::__construct($file);
     $this->_timeToLive = $timeToLive;
 }
示例#4
0
 function __construct($id)
 {
     parent::__construct(BASEPATH . "/storage/comments_{$id}.txt", array('commenter', 'comment', 'date'));
 }
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->actsAs = array('Imagine.Imagine', 'FileStorage.UploadValidator' => array('localFile' => true, 'validate' => false, 'allowedExtensions' => array('jpg', 'jpeg', 'png', 'gif')));
 }
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->actsAs = array('FileStorage.UploadValidator' => array('localFile' => true, 'validate' => false, 'allowedExtensions' => array('mpg', 'mov', 'wmv', 'avi', 'f4v', 'flv', 'h264', 'm4v', 'mkv', 'mp4', 'mp4v', 'wav', 'mpe', 'mpeg', 'mpeg4', 'mpg', 'nsv', 'qt', 'swf', 'xvid')));
 }