Example #1
0
 /**
  * vraci adresar
  * @return string
  * @throws LBoxException
  */
 public function getDirName()
 {
     try {
         if (strlen($this->pathsByTypes[get_class($this)]) > 0) {
             return $this->pathsByTypes[get_class($this)];
         }
         $path = LBoxConfigManagerProperties::getPropertyContentByName($this->propertyNamePath);
         $path = str_ireplace("<project>", LBOX_PATH_PROJECT, $path);
         if ($this->getPhotogallery()) {
             $path = str_ireplace("<photogallery_name>", LBoxUtil::fixFileName($this->getPhotogallery()->name), $path);
             $path = str_ireplace("<photogallery_url>", LBoxUtil::fixFileName($this->getPhotogallery()->getParamDirect("url")), $path);
         }
         $path = str_ireplace("/", SLASH, $path);
         $path = str_ireplace("\\", SLASH, $path);
         $this->createDirByPath($path);
         return $this->pathsByTypes[get_class($this)] = $path;
     } catch (Exception $e) {
         throw $e;
     }
 }