diff --git a/path/path.php b/path/path.php index e17d90f..92472ff 100644 --- a/path/path.php +++ b/path/path.php @@ -1,16 +1,54 @@ basepath = $basepath; $this->path = $path; $this->subpath = $subpath; } + + /** + * Calculate Serverpath of the given pathobject + * + * @return string Serverpath of the given pathobject + */ public function SERVERPATH(){ return $this->basepath->SERVERPATH().$this->path.$this->subpath;} + + /** + * Calculate Webpath of the given pathobject + * + * @param bool $mask Mask the path using System cache functionality + * @return string Webpath of the given pathobject + */ function WEBPATH($mask = true){ if($mask){ $path = $this->basepath->SERVERPATH().$this->path.$this->subpath; @@ -22,11 +60,32 @@ class PATH { } } +/** + * Root Path Class provided by System. + */ class PROOT extends PATH { + /** + * Construct the path with given subpath + * + * @param string $subpath Subpath + */ public function __construct($subpath = '') { $this->subpath = $subpath;} + + /** + * Calculate Serverpath of the root path object + * + * @return string Serverpath of the given pathobject + */ public function SERVERPATH(){ return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH).$this->subpath;} + + /** + * Calculate Webpath of the root path object + * + * @param bool $mask Mask the path using System cache functionality + * @return string Webpath of the given pathobject + */ function WEBPATH($mask = true){ if($mask){ $path = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL).$this->subpath; @@ -38,22 +97,54 @@ class PROOT extends PATH { } } +/** + * System Path Class provided by System. + */ class PSYSTEM extends PATH { + /** + * Construct the path with given subpath + * + * @param string $subpath Subpath + */ public function __construct($subpath = '') { parent::__construct(new \SYSTEM\PROOT(), \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL), $subpath);} } +/** + * System SAI Path Class provided by System. + */ class PSAI extends PATH { + /** + * Construct the path with given subpath + * + * @param string $subpath Subpath + */ public function __construct($subpath = '') { parent::__construct(new \SYSTEM\PSYSTEM(), 'sai/', $subpath);} } +/** + * System Lib Path Class provided by System. + */ class PLIB extends PATH { + /** + * Construct the path with given subpath + * + * @param string $subpath Subpath + */ public function __construct($subpath = '') { parent::__construct(new \SYSTEM\PSYSTEM(), 'lib/', $subpath);} } +/** + * System SQL Path Class provided by System. + */ class PSQL extends PATH { + /** + * Construct the path with given subpath + * + * @param string $subpath Subpath + */ public function __construct($subpath = '') { parent::__construct(new \SYSTEM\PSYSTEM(), 'sql/', $subpath);} } \ No newline at end of file