Esempio n. 1
0
 /**
  *@param string $singlename
  *@return string
  *@desc
  */
 public function __construct($singlename)
 {
     parent::__construct($singlename);
     // The function to manipulate HASHED XML files is in BTREEUTILS...
     // So nothing to change HERE (instead XMLCacheFileName and XSLCacheFileName).
     $this->_filenameLocation = ForceFilenameLocation::PrivatePath;
 }
Esempio n. 2
0
 /**
  * Use singlename like path/to/file/filename.* to get the source file extension
  * @param string $singlename
  * @return void
  */
 public function __construct($singlename = "")
 {
     if ($singlename == "") {
         $singlename = basename(tempnam('/tmp/', 'upload_'));
         parent::__construct($singlename);
         $this->setFilenameLocation(ForceFilenameLocation::DefinePath, "/tmp");
     } else {
         parent::__construct($singlename);
         $this->_filenameLocation = ForceFilenameLocation::PrivatePath;
     }
 }
Esempio n. 3
0
 /**
  *
  * @param string $singlename
  */
 public function __construct($singlename)
 {
     parent::__construct($singlename);
     if ($this->_context->CacheHashedDir()) {
         $this->setFilenameLocation(ForceFilenameLocation::DefinePath, $this->_context->CachePath() . $singlename[0] . FileUtil::Slash() . $singlename[1] . FileUtil::Slash());
         if (!FileUtil::Exists($this->PathSuggested())) {
             FileUtil::ForceDirectories($this->PathSuggested());
         }
     } else {
         $this->_filenameLocation = ForceFilenameLocation::PrivatePath;
     }
 }
Esempio n. 4
0
 /**
  * Use singlename as path/to/file/*.* to get the source file name and extension
  * @param string $singlename
  * @param Context $context
  */
 public function __construct($singlename)
 {
     $parts = pathinfo($singlename);
     if ($parts["dirname"] != '.') {
         $slash = FileUtil::Slash();
         $this->_subpath = $parts["dirname"] . $slash;
         if ($this->_subpath[0] == $slash) {
             $this->_subpath = substr($this->_subpath, 1);
         }
     } else {
         $this->_subpath = '';
     }
     $this->_extension = $parts["extension"];
     if (empty($this->_extension)) {
         $this->_extension = 'jpg';
     }
     $singlename = basename($parts["basename"], $this->Extension());
     parent::__construct($singlename);
 }
Esempio n. 5
0
 /**
  *@param string $singlename
  *@return void
  *@desc
  */
 public function __construct($singlename)
 {
     parent::__construct($singlename);
 }