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']; }
/** * 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; }
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'))); }