108 $regex_client =
"[\\w-\\.]*";
110 preg_match(
"/\\/" . self::DIR_DATA .
"\\/({$regex_client})\\/(" . self::DIR_SEC .
"\\/|)([\\w]*)\\/(.*)/ui",
$path,
$results);
111 preg_match(
"/(\\/" . self::DIR_DATA .
"\\/{$regex_client}\\/[\\w]*\\/.*)\\?/ui",
$path, $results2);
113 $this->
setPath(
'.' . $results[0]);
117 $parts = parse_url(
$path);
119 if (isset($parts[
'query'])) {
120 $parts_query = $parts[
'query'];
122 parse_str($parts_query,
$query);
125 $this->
setSuffix(pathinfo($parts[
'path'], PATHINFO_EXTENSION));
126 preg_match(
"/\\/" . self::DIR_DATA .
"\\/({$regex_client})\\/(" . self::DIR_SEC
127 .
"\\/[\\w]*\\/[\\d]*\\/|[\\w]*\\/)([\\w]*)\\//ui",
$path, $results3);
128 $this->
setSecurePath(isset($results3[0]) ?
'.' . $results3[0] : null);
136 $this->
setToken($param[ilWACSignedPath::WAC_TOKEN_ID]);
139 $this->
setTimestamp($param[ilWACSignedPath::WAC_TIMESTAMP_ID]);
142 $this->
setTTL($param[ilWACSignedPath::WAC_TTL_ID]);
159 return in_array(strtolower($this->
getSuffix()), self::$image_suffixes);
167 return in_array(strtolower($this->
getSuffix()), self::$video_suffixes);
175 return in_array(strtolower($this->
getSuffix()), self::$audio_suffixes);
199 return ($this->token !=
'');
207 return ($this->timestamp != 0);
215 return ($this->ttl != 0);
402 return self::$image_suffixes;
418 return self::$video_suffixes;
setPathWithoutQuery($path_without_query)
setSecurePath($secure_path)
static getVideoSuffixes()
static getImageSuffixes()
static setImageSuffixes($image_suffixes)
__construct($path)
ilWACPath constructor.
static setVideoSuffixes($video_suffixes)
setParameters($parameters)
setSecurePathId($secure_path_id)
setOriginalRequest($original_request)
setInSecFolder($in_sec_folder)