/** * Register the global cache directory path * @param string $path the cache directory path * @param boolean $validate should validate the path existance? * @throws \zinux\kernel\exceptions\notFoundException if cache directory not found */ public static function RegisterCachePath($path, $validate = 1) { if (!strlen($path)) { throw new \zinux\kernel\exceptions\notFoundException("Cache directory address is empty ..."); } if ($path[strlen($path) - 1] != DIRECTORY_SEPARATOR) { $path = $path . DIRECTORY_SEPARATOR; } self::$_cachedirectory = $path; if ($validate) { $c = new self(); $c->_checkCacheDir(); } }