コード例 #1
0
 /**
  * Constructor.
  *
  * @param string $name Name of the attribute
  * @param int $flags Flags for this attribute
  * @param string|array $dir Can be a string with the Directory with images/files or an array with a Directory and a Display Url
  *
  */
 public function __construct($name, $flags = 0, $dir)
 {
     $flags = $flags | self::AF_CASCADE_DELETE;
     parent::__construct($name, $flags, '');
     if (is_array($dir)) {
         $this->m_dir = $this->AddSlash($dir[0]);
         $this->m_url = $this->AddSlash($dir[1]);
     } else {
         $this->m_dir = $this->AddSlash($dir);
         $this->m_url = $this->AddSlash($dir);
     }
 }
コード例 #2
0
ファイル: FileCache.php プロジェクト: sintattica/atk
 /**
  * Set the directory that the cache should be written in.
  */
 protected function setCachePath()
 {
     $this->m_path = $this->getCacheConfig('path', Config::getGlobal('atktempdir') . 'cache/') . $this->getFileSafeNamespace() . '/';
     FileAttribute::mkdir($this->m_path);
 }