ILIAS  release_7 Revision v7.30-3-g800a261c036
ilWACPath Class Reference

Class ilWACPath. More...

+ Collaboration diagram for ilWACPath:

Public Member Functions

 __construct (string $path, bool $normalize=true)
 
 getParameters ()
 
 setParameters (array $parameters)
 
 getPrefix ()
 
 setPrefix ($prefix)
 
 getAppendix ()
 
 setAppendix ($appendix)
 
 getModulePath ()
 
 setModulePath ($module_path)
 
 getDirName ()
 
 getPathWithoutQuery ()
 
 setPathWithoutQuery ($path_without_query)
 
 isImage ()
 
 getSuffix ()
 
 setSuffix ($suffix)
 
 isStreamable ()
 
 isAudio ()
 
 isVideo ()
 
 fileExists ()
 
 hasToken ()
 
 hasTimestamp ()
 
 hasTTL ()
 
 getToken ()
 
 setToken ($token)
 
 getTimestamp ()
 
 setTimestamp ($timestamp)
 
 getTTL ()
 
 setTTL ($ttl)
 
 getClient ()
 
 setClient ($client)
 
 getSecurePathId ()
 
 setSecurePathId ($secure_path_id)
 
 getPath ()
 
 getCleanURLdecodedPath ()
 Returns a clean (everything behind ? is removed and rawurldecoded path. More...
 
 setPath ($path)
 
 getQuery ()
 
 setQuery ($query)
 
 getFileName ()
 
 setFileName ($file_name)
 
 getOriginalRequest ()
 
 setOriginalRequest ($original_request)
 
 getSecurePath ()
 
 setSecurePath ($secure_path)
 
 isInSecFolder ()
 
 setInSecFolder ($in_sec_folder)
 
 getModuleType ()
 
 setModuleType ($module_type)
 
 getModuleIdentifier ()
 
 setModuleIdentifier ($module_identifier)
 

Static Public Member Functions

static getAudioSuffixes ()
 
static setAudioSuffixes (array $audio_suffixes)
 
static getImageSuffixes ()
 
static setImageSuffixes (array $image_suffixes)
 
static getVideoSuffixes ()
 
static setVideoSuffixes (array $video_suffixes)
 

Data Fields

const DIR_DATA = "data"
 
const DIR_SEC = "sec"
 
const REGEX = "(?<prefix>.*?)(?<path>(?<path_without_query>(?<secure_path_id>(?<module_path>\/data\/(?<client>[\w\-\.]*)\/(?<sec>sec\/|)(?<module_type>.*?)\/(?<module_identifier>.*\/|)))(?<appendix>[^\?\n]*)).*)"
 Copy this without to regex101.com and test with some URL of files. More...
 

Protected Member Functions

 handleParameters ()
 
 normalizePath (string $path)
 

Protected Attributes

 $client = ''
 
 $parameters = []
 
 $in_sec_folder = false
 
 $token = ''
 
 $timestamp = 0
 
 $ttl = 0
 
 $secure_path = ''
 
 $secure_path_id = ''
 
 $original_request = ''
 
 $file_name = ''
 
 $query = ''
 
 $suffix = ''
 
 $prefix = ''
 
 $appendix = ''
 
 $module_path = ''
 
 $path = ''
 
 $module_type = ''
 
 $module_identifier = ''
 
 $path_without_query = ''
 

Static Protected Attributes

static $image_suffixes = ['png', 'jpg', 'jpeg', 'gif', 'svg']
 
static $video_suffixes = ['mp4', 'm4v', 'mov', 'wmv', 'webm']
 
static $audio_suffixes = ['mp3', 'aiff', 'aif', 'm4a', 'wav']
 

Detailed Description

Class ilWACPath.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 26 of file class.ilWACPath.php.

Constructor & Destructor Documentation

◆ __construct()

ilWACPath::__construct ( string  $path,
bool  $normalize = true 
)

Definition at line 124 of file class.ilWACPath.php.

125 {
126 if ($normalize) {
127 $path = $this->normalizePath($path);
128 }
129
131
132 $re = '/' . self::REGEX . '/';
133 preg_match($re, $path, $result);
134
135 $result['path_without_query'] = strstr(
136 parse_url($path)['path'],
137 '/data/',
138 false
139 );
140
141 foreach ($result as $k => $v) {
142 if (is_numeric($k)) {
143 unset($result[$k]);
144 }
145 }
146
147 $moduleId = strstr($result['module_identifier'] ?? '', "/", true);
148 $moduleId = $moduleId === false ? '' : $moduleId;
149
150 $this->setPrefix($result['prefix'] ?? '');
151 $this->setClient($result['client'] ?? '');
152 $this->setAppendix($result['appendix'] ?? '');
153 $this->setModuleIdentifier($moduleId);
154 $this->setModuleType($result['module_type'] ?? '');
155
156 $modulePath = null;
157
158 if ($this->getModuleIdentifier()) {
159 $modulePath = strstr($result['module_path'] ?? '', $this->getModuleIdentifier(), true);
160 $modulePath = '.' . ($modulePath === false ? '' : $modulePath);
161 } else {
162 $modulePath = ('.' . ($result['module_path'] ?? ''));
163 }
164
165 $this->setModulePath((string) $modulePath);
166 $this->setInSecFolder(($result['sec'] ?? null) === 'sec/');
167 $this->setPathWithoutQuery('.' . ($result['path_without_query'] ?? ''));
168 $this->setPath('.' . ($result['path'] ?? ''));
169 $this->setSecurePath('.' . ($result['secure_path_id'] ?? ''));
170 $this->setSecurePathId($result['module_type'] ?? '');
171 // Pathinfo
172 $parts = parse_url($path);
173 $this->setFileName(basename($parts['path']));
174 if (isset($parts['query'])) {
175 $parts_query = $parts['query'];
176 $this->setQuery($parts_query);
177 parse_str($parts_query, $query);
178 $this->setParameters($query);
179 }
180 $this->setSuffix(pathinfo($parts['path'], PATHINFO_EXTENSION));
181 $this->handleParameters();
182 }
$result
setAppendix($appendix)
setOriginalRequest($original_request)
setSecurePathId($secure_path_id)
setClient($client)
setQuery($query)
setModuleIdentifier($module_identifier)
normalizePath(string $path)
setModulePath($module_path)
setModuleType($module_type)
setInSecFolder($in_sec_folder)
setSuffix($suffix)
setSecurePath($secure_path)
setParameters(array $parameters)
setFileName($file_name)
setPrefix($prefix)
setPathWithoutQuery($path_without_query)

References $path, $query, $result, getModuleIdentifier(), handleParameters(), normalizePath(), setAppendix(), setClient(), setFileName(), setInSecFolder(), setModuleIdentifier(), setModulePath(), setModuleType(), setOriginalRequest(), setParameters(), setPath(), setPathWithoutQuery(), setPrefix(), setQuery(), setSecurePath(), setSecurePathId(), and setSuffix().

+ Here is the call graph for this function:

Member Function Documentation

◆ fileExists()

ilWACPath::fileExists ( )
Returns
bool

Definition at line 444 of file class.ilWACPath.php.

445 {
446 return (bool) is_file($this->getPathWithoutQuery());
447 }

References getPathWithoutQuery().

+ Here is the call graph for this function:

◆ getAppendix()

ilWACPath::getAppendix ( )
Returns
string

Definition at line 323 of file class.ilWACPath.php.

324 {
325 return (string) $this->appendix;
326 }

References $appendix.

◆ getAudioSuffixes()

static ilWACPath::getAudioSuffixes ( )
static
Returns
array

Definition at line 221 of file class.ilWACPath.php.

222 {
223 return (array) self::$audio_suffixes;
224 }
static $audio_suffixes

References $audio_suffixes.

◆ getCleanURLdecodedPath()

ilWACPath::getCleanURLdecodedPath ( )

Returns a clean (everything behind ? is removed and rawurldecoded path.

Returns
string

Definition at line 588 of file class.ilWACPath.php.

589 {
590 return rawurldecode($this->getPathWithoutQuery());
591 }

References getPathWithoutQuery().

+ Here is the call graph for this function:

◆ getClient()

ilWACPath::getClient ( )
Returns
string

Definition at line 539 of file class.ilWACPath.php.

540 {
541 return (string) $this->client;
542 }

References $client.

◆ getDirName()

ilWACPath::getDirName ( )
Returns
string

Definition at line 361 of file class.ilWACPath.php.

362 {
363 return (string) dirname($this->getPathWithoutQuery());
364 }

References getPathWithoutQuery().

+ Here is the call graph for this function:

◆ getFileName()

ilWACPath::getFileName ( )
Returns
string

Definition at line 626 of file class.ilWACPath.php.

627 {
628 return (string) $this->file_name;
629 }

References $file_name.

Referenced by ilObjUserAccess\canBeDelivered().

+ Here is the caller graph for this function:

◆ getImageSuffixes()

static ilWACPath::getImageSuffixes ( )
static
Returns
array

Definition at line 239 of file class.ilWACPath.php.

240 {
241 return (array) self::$image_suffixes;
242 }
static $image_suffixes

References $image_suffixes.

◆ getModuleIdentifier()

ilWACPath::getModuleIdentifier ( )
Returns
string

Definition at line 721 of file class.ilWACPath.php.

722 {
723 return (string) $this->module_identifier;
724 }

References $module_identifier.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getModulePath()

ilWACPath::getModulePath ( )
Returns
string

Definition at line 342 of file class.ilWACPath.php.

343 {
344 return (string) $this->module_path;
345 }

References $module_path.

◆ getModuleType()

ilWACPath::getModuleType ( )
Returns
string

Definition at line 702 of file class.ilWACPath.php.

703 {
704 return (string) $this->module_type;
705 }

References $module_type.

Referenced by ilWACSecurePath\hasCheckingInstanceRegistered().

+ Here is the caller graph for this function:

◆ getOriginalRequest()

ilWACPath::getOriginalRequest ( )
Returns
string

Definition at line 645 of file class.ilWACPath.php.

646 {
647 return (string) $this->original_request;
648 }

References $original_request.

◆ getParameters()

ilWACPath::getParameters ( )
Returns
array

Definition at line 203 of file class.ilWACPath.php.

204 {
205 return (array) $this->parameters;
206 }

References $parameters.

Referenced by handleParameters().

+ Here is the caller graph for this function:

◆ getPath()

◆ getPathWithoutQuery()

ilWACPath::getPathWithoutQuery ( )
Returns
string

Definition at line 370 of file class.ilWACPath.php.

371 {
372 return (string) $this->path_without_query;
373 }

References $path_without_query.

Referenced by fileExists(), getCleanURLdecodedPath(), and getDirName().

+ Here is the caller graph for this function:

◆ getPrefix()

ilWACPath::getPrefix ( )
Returns
string

Definition at line 304 of file class.ilWACPath.php.

305 {
306 return (string) $this->prefix;
307 }

References $prefix.

◆ getQuery()

ilWACPath::getQuery ( )
Returns
string

Definition at line 607 of file class.ilWACPath.php.

608 {
609 return (string) $this->query;
610 }

References $query.

◆ getSecurePath()

ilWACPath::getSecurePath ( )
Returns
string

Definition at line 664 of file class.ilWACPath.php.

665 {
666 return (string) $this->secure_path;
667 }

References $secure_path.

◆ getSecurePathId()

ilWACPath::getSecurePathId ( )
Returns
string

Definition at line 558 of file class.ilWACPath.php.

559 {
560 return (string) $this->secure_path_id;
561 }

References $secure_path_id.

Referenced by ilObjFileAccess\canBeDelivered().

+ Here is the caller graph for this function:

◆ getSuffix()

ilWACPath::getSuffix ( )
Returns
string

Definition at line 398 of file class.ilWACPath.php.

399 {
400 return (string) $this->suffix;
401 }

References $suffix.

Referenced by isAudio(), isImage(), and isVideo().

+ Here is the caller graph for this function:

◆ getTimestamp()

ilWACPath::getTimestamp ( )
Returns
int

Definition at line 500 of file class.ilWACPath.php.

501 {
502 return (int) $this->timestamp;
503 }

References $timestamp.

◆ getToken()

ilWACPath::getToken ( )
Returns
string

Definition at line 480 of file class.ilWACPath.php.

481 {
482 return (string) $this->token;
483 }

References $token.

◆ getTTL()

ilWACPath::getTTL ( )
Returns
int

Definition at line 520 of file class.ilWACPath.php.

521 {
522 return (int) $this->ttl;
523 }

References $ttl.

◆ getVideoSuffixes()

static ilWACPath::getVideoSuffixes ( )
static
Returns
array

Definition at line 257 of file class.ilWACPath.php.

258 {
259 return (array) self::$video_suffixes;
260 }
static $video_suffixes

References $video_suffixes.

◆ handleParameters()

ilWACPath::handleParameters ( )
protected

Definition at line 185 of file class.ilWACPath.php.

186 {
187 $param = $this->getParameters();
189 $this->setToken($param[ilWACSignedPath::WAC_TOKEN_ID]);
190 }
193 }
196 }
197 }
setToken($token)
setTimestamp($timestamp)
$param
Definition: xapitoken.php:29

References $param, getParameters(), setTimestamp(), setToken(), setTTL(), ilWACSignedPath\WAC_TIMESTAMP_ID, ilWACSignedPath\WAC_TOKEN_ID, and ilWACSignedPath\WAC_TTL_ID.

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasTimestamp()

ilWACPath::hasTimestamp ( )
Returns
bool

Definition at line 462 of file class.ilWACPath.php.

463 {
464 return (bool) ($this->timestamp !== 0);
465 }

◆ hasToken()

ilWACPath::hasToken ( )
Returns
bool

Definition at line 453 of file class.ilWACPath.php.

454 {
455 return (bool) ($this->token !== '');
456 }

◆ hasTTL()

ilWACPath::hasTTL ( )
Returns
bool

Definition at line 471 of file class.ilWACPath.php.

472 {
473 return (bool) ($this->ttl !== 0);
474 }

◆ isAudio()

ilWACPath::isAudio ( )
Returns
bool

Definition at line 426 of file class.ilWACPath.php.

427 {
428 return (bool) in_array(strtolower($this->getSuffix()), self::$audio_suffixes);
429 }

References getSuffix().

Referenced by isStreamable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isImage()

ilWACPath::isImage ( )
Returns
bool

Definition at line 389 of file class.ilWACPath.php.

390 {
391 return (bool) in_array(strtolower($this->getSuffix()), self::$image_suffixes);
392 }

References getSuffix().

+ Here is the call graph for this function:

◆ isInSecFolder()

ilWACPath::isInSecFolder ( )
Returns
bool

Definition at line 683 of file class.ilWACPath.php.

684 {
685 return (bool) $this->in_sec_folder;
686 }

References $in_sec_folder.

◆ isStreamable()

ilWACPath::isStreamable ( )
Returns
bool

Definition at line 417 of file class.ilWACPath.php.

418 {
419 return (bool) ($this->isAudio() || $this->isVideo());
420 }

References isAudio(), and isVideo().

+ Here is the call graph for this function:

◆ isVideo()

ilWACPath::isVideo ( )
Returns
bool

Definition at line 435 of file class.ilWACPath.php.

436 {
437 return (bool) in_array(strtolower($this->getSuffix()), self::$video_suffixes);
438 }

References getSuffix().

Referenced by isStreamable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizePath()

ilWACPath::normalizePath ( string  $path)
protected

Definition at line 271 of file class.ilWACPath.php.

271 : string
272 {
273 $path = ltrim($path, '.');
274 $path = rawurldecode($path);
275
276 // cut everything before "data/" (for installations using a subdirectory)
277 $path = strstr($path, '/' . self::DIR_DATA . '/');
278
279 $original_path = parse_url($path, PHP_URL_PATH);
280 $query = parse_url($path, PHP_URL_QUERY);
281
282 $real_data_dir = realpath("./" . self::DIR_DATA);
283 $realpath = realpath("." . $original_path);
284
285 if (strpos($realpath, (string) $real_data_dir) !== 0) {
286 throw new ilWACException(ilWACException::NOT_FOUND, "Path is not in data directory");
287 }
288
289 $normalized_path = ltrim(
290 str_replace(
291 $real_data_dir,
292 '',
293 $realpath
294 ),
295 '/'
296 );
297
298 return "/" . self::DIR_DATA . '/' . $normalized_path . (!empty($query) ? '?' . $query : '');
299 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $path, $query, and ilWACException\NOT_FOUND.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setAppendix()

ilWACPath::setAppendix (   $appendix)
Parameters
string$appendix

Definition at line 332 of file class.ilWACPath.php.

333 {
334 assert(is_string($appendix));
335 $this->appendix = $appendix;
336 }

References $appendix.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setAudioSuffixes()

static ilWACPath::setAudioSuffixes ( array  $audio_suffixes)
static
Parameters
array$audio_suffixes

Definition at line 230 of file class.ilWACPath.php.

231 {
232 self::$audio_suffixes = $audio_suffixes;
233 }

References $audio_suffixes.

◆ setClient()

ilWACPath::setClient (   $client)
Parameters
string$client

Definition at line 548 of file class.ilWACPath.php.

549 {
550 assert(is_string($client));
551 $this->client = $client;
552 }

References $client.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setFileName()

ilWACPath::setFileName (   $file_name)
Parameters
string$file_name

Definition at line 635 of file class.ilWACPath.php.

636 {
637 assert(is_string($file_name));
638 $this->file_name = $file_name;
639 }

References $file_name.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setImageSuffixes()

static ilWACPath::setImageSuffixes ( array  $image_suffixes)
static
Parameters
array$image_suffixes

Definition at line 248 of file class.ilWACPath.php.

249 {
250 self::$image_suffixes = $image_suffixes;
251 }

References $image_suffixes.

◆ setInSecFolder()

ilWACPath::setInSecFolder (   $in_sec_folder)
Parameters
bool$in_sec_folder

Definition at line 692 of file class.ilWACPath.php.

693 {
694 assert(is_bool($in_sec_folder));
695 $this->in_sec_folder = $in_sec_folder;
696 }

References $in_sec_folder.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setModuleIdentifier()

ilWACPath::setModuleIdentifier (   $module_identifier)
Parameters
string$module_identifier

Definition at line 730 of file class.ilWACPath.php.

731 {
732 assert(is_string($module_identifier));
733 $this->module_identifier = $module_identifier;
734 }

References $module_identifier.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setModulePath()

ilWACPath::setModulePath (   $module_path)
Parameters
string$module_path

Definition at line 351 of file class.ilWACPath.php.

352 {
353 assert(is_string($module_path));
354 $this->module_path = $module_path;
355 }

References $module_path.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setModuleType()

ilWACPath::setModuleType (   $module_type)
Parameters
string$module_type

Definition at line 711 of file class.ilWACPath.php.

712 {
713 assert(is_string($module_type));
714 $this->module_type = $module_type;
715 }

References $module_type.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setOriginalRequest()

ilWACPath::setOriginalRequest (   $original_request)
Parameters
string$original_request

Definition at line 654 of file class.ilWACPath.php.

655 {
656 assert(is_string($original_request));
657 $this->original_request = $original_request;
658 }

References $original_request.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setParameters()

ilWACPath::setParameters ( array  $parameters)
Parameters
array$parameters

Definition at line 212 of file class.ilWACPath.php.

213 {
214 $this->parameters = $parameters;
215 }

References $parameters.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setPath()

ilWACPath::setPath (   $path)
Parameters
string$path

Definition at line 597 of file class.ilWACPath.php.

598 {
599 assert(is_string($path));
600 $this->path = $path;
601 }

References $path.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setPathWithoutQuery()

ilWACPath::setPathWithoutQuery (   $path_without_query)
Parameters
string$path_without_query

Definition at line 379 of file class.ilWACPath.php.

380 {
381 assert(is_string($path_without_query));
382 $this->path_without_query = $path_without_query;
383 }

References $path_without_query.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setPrefix()

ilWACPath::setPrefix (   $prefix)
Parameters
string$prefix

Definition at line 313 of file class.ilWACPath.php.

314 {
315 assert(is_string($prefix));
316 $this->prefix = $prefix;
317 }

References $prefix.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setQuery()

ilWACPath::setQuery (   $query)
Parameters
string$query

Definition at line 616 of file class.ilWACPath.php.

617 {
618 assert(is_string($query));
619 $this->query = $query;
620 }

References $query.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSecurePath()

ilWACPath::setSecurePath (   $secure_path)
Parameters
string$secure_path

Definition at line 673 of file class.ilWACPath.php.

674 {
675 assert(is_string($secure_path));
676 $this->secure_path = $secure_path;
677 }

References $secure_path.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSecurePathId()

ilWACPath::setSecurePathId (   $secure_path_id)
Parameters
string$secure_path_id

Definition at line 567 of file class.ilWACPath.php.

568 {
569 assert(is_string($secure_path_id));
570 $this->secure_path_id = $secure_path_id;
571 }

References $secure_path_id.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSuffix()

ilWACPath::setSuffix (   $suffix)
Parameters
string$suffix

Definition at line 407 of file class.ilWACPath.php.

408 {
409 assert(is_string($suffix));
410 $this->suffix = $suffix;
411 }

References $suffix.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setTimestamp()

ilWACPath::setTimestamp (   $timestamp)
Parameters
int$timestamp

Definition at line 509 of file class.ilWACPath.php.

510 {
511 assert(is_int($timestamp));
513 $this->timestamp = $timestamp;
514 }

References $timestamp, and ilWACSignedPath\WAC_TIMESTAMP_ID.

Referenced by handleParameters().

+ Here is the caller graph for this function:

◆ setToken()

ilWACPath::setToken (   $token)
Parameters
string$token

Definition at line 489 of file class.ilWACPath.php.

490 {
491 assert(is_string($token));
492 $this->parameters[ilWACSignedPath::WAC_TOKEN_ID] = $token;
493 $this->token = $token;
494 }

References $token, and ilWACSignedPath\WAC_TOKEN_ID.

Referenced by handleParameters().

+ Here is the caller graph for this function:

◆ setTTL()

ilWACPath::setTTL (   $ttl)
Parameters
int$ttl

Definition at line 529 of file class.ilWACPath.php.

530 {
531 $this->parameters[ilWACSignedPath::WAC_TTL_ID] = $ttl;
532 $this->ttl = $ttl;
533 }

References $ttl, and ilWACSignedPath\WAC_TTL_ID.

Referenced by handleParameters().

+ Here is the caller graph for this function:

◆ setVideoSuffixes()

static ilWACPath::setVideoSuffixes ( array  $video_suffixes)
static
Parameters
array$video_suffixes

Definition at line 266 of file class.ilWACPath.php.

267 {
268 self::$video_suffixes = $video_suffixes;
269 }

References $video_suffixes.

Field Documentation

◆ $appendix

ilWACPath::$appendix = ''
protected

Definition at line 101 of file class.ilWACPath.php.

Referenced by getAppendix(), and setAppendix().

◆ $audio_suffixes

ilWACPath::$audio_suffixes = ['mp3', 'aiff', 'aif', 'm4a', 'wav']
staticprotected

Definition at line 45 of file class.ilWACPath.php.

Referenced by getAudioSuffixes(), and setAudioSuffixes().

◆ $client

ilWACPath::$client = ''
protected

Definition at line 49 of file class.ilWACPath.php.

Referenced by getClient(), and setClient().

◆ $file_name

ilWACPath::$file_name = ''
protected

Definition at line 85 of file class.ilWACPath.php.

Referenced by getFileName(), and setFileName().

◆ $image_suffixes

ilWACPath::$image_suffixes = ['png', 'jpg', 'jpeg', 'gif', 'svg']
staticprotected

Definition at line 37 of file class.ilWACPath.php.

Referenced by getImageSuffixes(), and setImageSuffixes().

◆ $in_sec_folder

ilWACPath::$in_sec_folder = false
protected

Definition at line 57 of file class.ilWACPath.php.

Referenced by isInSecFolder(), and setInSecFolder().

◆ $module_identifier

ilWACPath::$module_identifier = ''
protected

Definition at line 117 of file class.ilWACPath.php.

Referenced by getModuleIdentifier(), and setModuleIdentifier().

◆ $module_path

ilWACPath::$module_path = ''
protected

Definition at line 105 of file class.ilWACPath.php.

Referenced by getModulePath(), and setModulePath().

◆ $module_type

ilWACPath::$module_type = ''
protected

Definition at line 113 of file class.ilWACPath.php.

Referenced by getModuleType(), and setModuleType().

◆ $original_request

ilWACPath::$original_request = ''
protected

Definition at line 81 of file class.ilWACPath.php.

Referenced by getOriginalRequest(), and setOriginalRequest().

◆ $parameters

ilWACPath::$parameters = []
protected

Definition at line 53 of file class.ilWACPath.php.

Referenced by getParameters(), and setParameters().

◆ $path

ilWACPath::$path = ''
protected

Definition at line 109 of file class.ilWACPath.php.

Referenced by __construct(), getPath(), normalizePath(), and setPath().

◆ $path_without_query

ilWACPath::$path_without_query = ''
protected

Definition at line 121 of file class.ilWACPath.php.

Referenced by getPathWithoutQuery(), and setPathWithoutQuery().

◆ $prefix

ilWACPath::$prefix = ''
protected

Definition at line 97 of file class.ilWACPath.php.

Referenced by getPrefix(), and setPrefix().

◆ $query

ilWACPath::$query = ''
protected

Definition at line 89 of file class.ilWACPath.php.

Referenced by __construct(), getQuery(), normalizePath(), and setQuery().

◆ $secure_path

ilWACPath::$secure_path = ''
protected

Definition at line 73 of file class.ilWACPath.php.

Referenced by getSecurePath(), and setSecurePath().

◆ $secure_path_id

ilWACPath::$secure_path_id = ''
protected

Definition at line 77 of file class.ilWACPath.php.

Referenced by getSecurePathId(), and setSecurePathId().

◆ $suffix

ilWACPath::$suffix = ''
protected

Definition at line 93 of file class.ilWACPath.php.

Referenced by getSuffix(), and setSuffix().

◆ $timestamp

ilWACPath::$timestamp = 0
protected

Definition at line 65 of file class.ilWACPath.php.

Referenced by getTimestamp(), and setTimestamp().

◆ $token

ilWACPath::$token = ''
protected

Definition at line 61 of file class.ilWACPath.php.

Referenced by getToken(), and setToken().

◆ $ttl

ilWACPath::$ttl = 0
protected

Definition at line 69 of file class.ilWACPath.php.

Referenced by getTTL(), and setTTL().

◆ $video_suffixes

ilWACPath::$video_suffixes = ['mp4', 'm4v', 'mov', 'wmv', 'webm']
staticprotected

Definition at line 41 of file class.ilWACPath.php.

Referenced by getVideoSuffixes(), and setVideoSuffixes().

◆ DIR_DATA

const ilWACPath::DIR_DATA = "data"

Definition at line 28 of file class.ilWACPath.php.

◆ DIR_SEC

const ilWACPath::DIR_SEC = "sec"

Definition at line 29 of file class.ilWACPath.php.

◆ REGEX

const ilWACPath::REGEX = "(?<prefix>.*?)(?<path>(?<path_without_query>(?<secure_path_id>(?<module_path>\/data\/(?<client>[\w\-\.]*)\/(?<sec>sec\/|)(?<module_type>.*?)\/(?<module_identifier>.*\/|)))(?<appendix>[^\?\n]*)).*)"

Copy this without to regex101.com and test with some URL of files.

Definition at line 33 of file class.ilWACPath.php.


The documentation for this class was generated from the following file: