ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWACPath Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilWACPath:

Public Member Functions

 __construct ($path)
 ilWACPath constructor. More...
 
 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 ()
 

Protected Attributes

 $client = ''
 
 $parameters = array()
 
 $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
 
static $video_suffixes
 
static $audio_suffixes
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 24 of file class.ilWACPath.php.

Constructor & Destructor Documentation

◆ __construct()

ilWACPath::__construct (   $path)

ilWACPath constructor.

Parameters
string$path

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

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

146  {
147  assert(is_string($path));
148  $this->setOriginalRequest($path);
149  $re = '/' . self::REGEX . '/';
150  preg_match($re, $path, $result);
151 
152  $url_parts = parse_url($path);
153  $result['path_without_query'] = $url_parts['path'];
154 
155  foreach ($result as $k => $v) {
156  if (is_numeric($k)) {
157  unset($result[$k]);
158  }
159  }
160 
161  $moduleId = strstr(is_null($result['module_identifier']) ? '' : $result['module_identifier'], "/", true);
162  $moduleId = $moduleId === false ? '' : $moduleId;
163 
164  $this->setPrefix(is_null($result['prefix']) ? '' : $result['prefix']);
165  $this->setClient(is_null($result['client']) ? '' : $result['client']);
166  $this->setAppendix(is_null($result['appendix']) ? '' : $result['appendix']);
167  $this->setModuleIdentifier($moduleId);
168  $this->setModuleType(is_null($result['module_type']) ? '' : $result['module_type']);
169 
170  $modulePath = null;
171 
172  if ($this->getModuleIdentifier()) {
173  $modulePath = strstr(is_null($result['module_path']) ? '' : $result['module_path'], $this->getModuleIdentifier(), true);
174  $modulePath = '.' . ($modulePath === false ? '' : $modulePath);
175  } else {
176  $modulePath = ('.' . (is_null($result['module_path']) ? '' : $result['module_path']));
177  }
178 
179  $this->setModulePath("$modulePath");
180  $this->setInSecFolder($result['sec'] === 'sec/');
181  $this->setPathWithoutQuery('.'
182  . (is_null($result['path_without_query']) ? '' : $result['path_without_query']));
183  $this->setPath('.' . (is_null($result['path']) ? '' : $result['path']));
184  $this->setSecurePath('.'
185  . (is_null($result['secure_path_id']) ? '' : $result['secure_path_id']));
186  $this->setSecurePathId(is_null($result['module_type']) ? '' : $result['module_type']);
187  // Pathinfo
188  $parts = parse_url($path);
189  $this->setFileName(basename($parts['path']));
190  if (isset($parts['query'])) {
191  $parts_query = $parts['query'];
192  $this->setQuery($parts_query);
193  parse_str($parts_query, $query);
194  $this->setParameters($query);
195  }
196  $this->setSuffix(pathinfo($parts['path'], PATHINFO_EXTENSION));
197  $this->handleParameters();
198  }
setPathWithoutQuery($path_without_query)
setQuery($query)
$result
setModulePath($module_path)
setClient($client)
setParameters(array $parameters)
setModuleType($module_type)
setSuffix($suffix)
setSecurePath($secure_path)
setModuleIdentifier($module_identifier)
setPrefix($prefix)
setSecurePathId($secure_path_id)
setFileName($file_name)
setAppendix($appendix)
setOriginalRequest($original_request)
setInSecFolder($in_sec_folder)
+ Here is the call graph for this function:

Member Function Documentation

◆ fileExists()

ilWACPath::fileExists ( )
Returns
bool

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

References getPathWithoutQuery().

432  {
433  return (bool) is_file($this->getPathWithoutQuery());
434  }
+ Here is the call graph for this function:

◆ getAppendix()

ilWACPath::getAppendix ( )
Returns
string

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

References $appendix.

311  {
312  return (string) $this->appendix;
313  }

◆ getAudioSuffixes()

static ilWACPath::getAudioSuffixes ( )
static
Returns
array

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

238  {
239  return (array) self::$audio_suffixes;
240  }

◆ getCleanURLdecodedPath()

ilWACPath::getCleanURLdecodedPath ( )

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

Returns
string

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

References getPathWithoutQuery().

576  {
577  $path_to_file = rawurldecode($this->getPathWithoutQuery());
578 
579  return $path_to_file;
580  }
+ Here is the call graph for this function:

◆ getClient()

ilWACPath::getClient ( )
Returns
string

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

References $client.

527  {
528  return (string) $this->client;
529  }

◆ getDirName()

ilWACPath::getDirName ( )
Returns
string

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

References getPathWithoutQuery().

349  {
350  return (string) dirname($this->getPathWithoutQuery());
351  }
+ Here is the call graph for this function:

◆ getFileName()

ilWACPath::getFileName ( )
Returns
string

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

References $file_name.

Referenced by ilObjUserAccess\canBeDelivered().

616  {
617  return (string) $this->file_name;
618  }
+ Here is the caller graph for this function:

◆ getImageSuffixes()

static ilWACPath::getImageSuffixes ( )
static
Returns
array

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

256  {
257  return (array) self::$image_suffixes;
258  }

◆ getModuleIdentifier()

ilWACPath::getModuleIdentifier ( )
Returns
string

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

References $module_identifier.

Referenced by __construct().

711  {
712  return (string) $this->module_identifier;
713  }
+ Here is the caller graph for this function:

◆ getModulePath()

ilWACPath::getModulePath ( )
Returns
string

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

References $module_path.

330  {
331  return (string) $this->module_path;
332  }

◆ getModuleType()

ilWACPath::getModuleType ( )
Returns
string

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

References $module_type.

Referenced by ilWACSecurePath\hasCheckingInstanceRegistered(), and ilWACSecurePath\returnDbTableName().

692  {
693  return (string) $this->module_type;
694  }
+ Here is the caller graph for this function:

◆ getOriginalRequest()

ilWACPath::getOriginalRequest ( )
Returns
string

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

References $original_request.

635  {
636  return (string) $this->original_request;
637  }

◆ getParameters()

ilWACPath::getParameters ( )
Returns
array

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

References $parameters.

Referenced by handleParameters().

220  {
221  return (array) $this->parameters;
222  }
+ Here is the caller graph for this function:

◆ getPath()

◆ getPathWithoutQuery()

ilWACPath::getPathWithoutQuery ( )
Returns
string

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

References $path_without_query.

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

358  {
359  return (string) $this->path_without_query;
360  }
+ Here is the caller graph for this function:

◆ getPrefix()

ilWACPath::getPrefix ( )
Returns
string

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

References $prefix.

292  {
293  return (string) $this->prefix;
294  }

◆ getQuery()

ilWACPath::getQuery ( )
Returns
string

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

References $query.

597  {
598  return (string) $this->query;
599  }

◆ getSecurePath()

ilWACPath::getSecurePath ( )
Returns
string

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

References $secure_path.

654  {
655  return (string) $this->secure_path;
656  }

◆ getSecurePathId()

ilWACPath::getSecurePathId ( )
Returns
string

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

References $secure_path_id.

Referenced by ilObjFileAccess\canBeDelivered(), and ilWACSecurePath\returnDbTableName().

546  {
547  return (string) $this->secure_path_id;
548  }
+ Here is the caller graph for this function:

◆ getSuffix()

ilWACPath::getSuffix ( )
Returns
string

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

References $suffix.

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

386  {
387  return (string) $this->suffix;
388  }
+ Here is the caller graph for this function:

◆ getTimestamp()

ilWACPath::getTimestamp ( )
Returns
int

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

References $timestamp.

488  {
489  return (int) $this->timestamp;
490  }

◆ getToken()

ilWACPath::getToken ( )
Returns
string

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

References $token.

468  {
469  return (string) $this->token;
470  }

◆ getTTL()

ilWACPath::getTTL ( )
Returns
int

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

References $ttl.

508  {
509  return (int) $this->ttl;
510  }

◆ getVideoSuffixes()

static ilWACPath::getVideoSuffixes ( )
static
Returns
array

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

274  {
275  return (array) self::$video_suffixes;
276  }

◆ handleParameters()

ilWACPath::handleParameters ( )
protected

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

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

Referenced by __construct().

202  {
203  $param = $this->getParameters();
205  $this->setToken($param[ilWACSignedPath::WAC_TOKEN_ID]);
206  }
208  $this->setTimestamp(intval($param[ilWACSignedPath::WAC_TIMESTAMP_ID]));
209  }
210  if (isset($param[ilWACSignedPath::WAC_TTL_ID])) {
211  $this->setTTL(intval($param[ilWACSignedPath::WAC_TTL_ID]));
212  }
213  }
setToken($token)
$param
Definition: xapitoken.php:31
setTimestamp($timestamp)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasTimestamp()

ilWACPath::hasTimestamp ( )
Returns
bool

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

450  {
451  return (bool) ($this->timestamp !== 0);
452  }

◆ hasToken()

ilWACPath::hasToken ( )
Returns
bool

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

441  {
442  return (bool) ($this->token !== '');
443  }

◆ hasTTL()

ilWACPath::hasTTL ( )
Returns
bool

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

459  {
460  return (bool) ($this->ttl !== 0);
461  }

◆ isAudio()

ilWACPath::isAudio ( )
Returns
bool

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

References getSuffix().

Referenced by isStreamable().

414  {
415  return (bool) in_array(strtolower($this->getSuffix()), self::$audio_suffixes);
416  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isImage()

ilWACPath::isImage ( )
Returns
bool

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

References getSuffix().

377  {
378  return (bool) in_array(strtolower($this->getSuffix()), self::$image_suffixes);
379  }
+ Here is the call graph for this function:

◆ isInSecFolder()

ilWACPath::isInSecFolder ( )
Returns
bool

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

References $in_sec_folder.

673  {
674  return (bool) $this->in_sec_folder;
675  }

◆ isStreamable()

ilWACPath::isStreamable ( )
Returns
bool

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

References isAudio(), and isVideo().

405  {
406  return (bool) ($this->isAudio() || $this->isVideo());
407  }
+ Here is the call graph for this function:

◆ isVideo()

ilWACPath::isVideo ( )
Returns
bool

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

References getSuffix().

Referenced by isStreamable().

423  {
424  return (bool) in_array(strtolower($this->getSuffix()), self::$video_suffixes);
425  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAppendix()

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

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

References $appendix.

Referenced by __construct().

320  {
321  assert(is_string($appendix));
322  $this->appendix = $appendix;
323  }
+ Here is the caller graph for this function:

◆ setAudioSuffixes()

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

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

References $audio_suffixes.

247  {
248  self::$audio_suffixes = $audio_suffixes;
249  }
static $audio_suffixes

◆ setClient()

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

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

References $client.

Referenced by __construct().

536  {
537  assert(is_string($client));
538  $this->client = $client;
539  }
+ Here is the caller graph for this function:

◆ setFileName()

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

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

References $file_name.

Referenced by __construct().

625  {
626  assert(is_string($file_name));
627  $this->file_name = $file_name;
628  }
+ Here is the caller graph for this function:

◆ setImageSuffixes()

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

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

References $image_suffixes.

265  {
266  self::$image_suffixes = $image_suffixes;
267  }
static $image_suffixes

◆ setInSecFolder()

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

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

References $in_sec_folder.

Referenced by __construct().

682  {
683  assert(is_bool($in_sec_folder));
684  $this->in_sec_folder = $in_sec_folder;
685  }
+ Here is the caller graph for this function:

◆ setModuleIdentifier()

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

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

References $module_identifier.

Referenced by __construct().

720  {
721  assert(is_string($module_identifier));
722  $this->module_identifier = $module_identifier;
723  }
+ Here is the caller graph for this function:

◆ setModulePath()

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

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

References $module_path.

Referenced by __construct().

339  {
340  assert(is_string($module_path));
341  $this->module_path = $module_path;
342  }
+ Here is the caller graph for this function:

◆ setModuleType()

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

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

References $module_type.

Referenced by __construct().

701  {
702  assert(is_string($module_type));
703  $this->module_type = $module_type;
704  }
+ Here is the caller graph for this function:

◆ setOriginalRequest()

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

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

References $original_request.

Referenced by __construct().

644  {
645  assert(is_string($original_request));
646  $this->original_request = $original_request;
647  }
+ Here is the caller graph for this function:

◆ setParameters()

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

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

References $parameters.

Referenced by __construct().

229  {
230  $this->parameters = $parameters;
231  }
+ Here is the caller graph for this function:

◆ setPath()

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

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

References $path.

Referenced by __construct().

587  {
588  assert(is_string($path));
589  $this->path = $path;
590  }
+ Here is the caller graph for this function:

◆ setPathWithoutQuery()

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

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

References $path_without_query.

Referenced by __construct().

367  {
368  assert(is_string($path_without_query));
369  $this->path_without_query = $path_without_query;
370  }
+ Here is the caller graph for this function:

◆ setPrefix()

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

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

References $prefix.

Referenced by __construct().

301  {
302  assert(is_string($prefix));
303  $this->prefix = $prefix;
304  }
+ Here is the caller graph for this function:

◆ setQuery()

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

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

References $query.

Referenced by __construct().

606  {
607  assert(is_string($query));
608  $this->query = $query;
609  }
+ Here is the caller graph for this function:

◆ setSecurePath()

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

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

References $secure_path.

Referenced by __construct().

663  {
664  assert(is_string($secure_path));
665  $this->secure_path = $secure_path;
666  }
+ Here is the caller graph for this function:

◆ setSecurePathId()

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

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

References $secure_path_id.

Referenced by __construct().

555  {
556  assert(is_string($secure_path_id));
557  $this->secure_path_id = $secure_path_id;
558  }
+ Here is the caller graph for this function:

◆ setSuffix()

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

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

References $suffix.

Referenced by __construct().

395  {
396  assert(is_string($suffix));
397  $this->suffix = $suffix;
398  }
+ Here is the caller graph for this function:

◆ setTimestamp()

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

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

References $timestamp, and ilWACSignedPath\WAC_TIMESTAMP_ID.

Referenced by handleParameters().

497  {
498  assert(is_int($timestamp));
499  $this->parameters[ilWACSignedPath::WAC_TIMESTAMP_ID] = $timestamp;
500  $this->timestamp = $timestamp;
501  }
+ Here is the caller graph for this function:

◆ setToken()

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

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

References $token, and ilWACSignedPath\WAC_TOKEN_ID.

Referenced by handleParameters().

477  {
478  assert(is_string($token));
479  $this->parameters[ilWACSignedPath::WAC_TOKEN_ID] = $token;
480  $this->token = $token;
481  }
+ Here is the caller graph for this function:

◆ setTTL()

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

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

References $ttl, and ilWACSignedPath\WAC_TTL_ID.

Referenced by handleParameters().

517  {
518  $this->parameters[ilWACSignedPath::WAC_TTL_ID] = $ttl;
519  $this->ttl = $ttl;
520  }
+ Here is the caller graph for this function:

◆ setVideoSuffixes()

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

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

References $video_suffixes.

283  {
284  self::$video_suffixes = $video_suffixes;
285  }
static $video_suffixes

Field Documentation

◆ $appendix

ilWACPath::$appendix = ''
protected

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

Referenced by getAppendix(), and setAppendix().

◆ $audio_suffixes

ilWACPath::$audio_suffixes
staticprotected
Initial value:
= array(
'mp3',
'aiff',
'aif',
'm4a',
'wav',
)

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

Referenced by setAudioSuffixes().

◆ $client

ilWACPath::$client = ''
protected

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

Referenced by getClient(), and setClient().

◆ $file_name

ilWACPath::$file_name = ''
protected

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

Referenced by getFileName(), and setFileName().

◆ $image_suffixes

ilWACPath::$image_suffixes
staticprotected
Initial value:
= array(
'png',
'jpg',
'jpeg',
'gif',
'svg',
)

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

Referenced by setImageSuffixes().

◆ $in_sec_folder

ilWACPath::$in_sec_folder = false
protected

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

Referenced by isInSecFolder(), and setInSecFolder().

◆ $module_identifier

ilWACPath::$module_identifier = ''
protected

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

Referenced by getModuleIdentifier(), and setModuleIdentifier().

◆ $module_path

ilWACPath::$module_path = ''
protected

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

Referenced by getModulePath(), and setModulePath().

◆ $module_type

ilWACPath::$module_type = ''
protected

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

Referenced by getModuleType(), and setModuleType().

◆ $original_request

ilWACPath::$original_request = ''
protected

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

Referenced by getOriginalRequest(), and setOriginalRequest().

◆ $parameters

ilWACPath::$parameters = array()
protected

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

Referenced by getParameters(), and setParameters().

◆ $path

ilWACPath::$path = ''
protected

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

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

◆ $path_without_query

ilWACPath::$path_without_query = ''
protected

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

Referenced by getPathWithoutQuery(), and setPathWithoutQuery().

◆ $prefix

ilWACPath::$prefix = ''
protected

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

Referenced by getPrefix(), and setPrefix().

◆ $query

ilWACPath::$query = ''
protected

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

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

◆ $secure_path

ilWACPath::$secure_path = ''
protected

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

Referenced by getSecurePath(), and setSecurePath().

◆ $secure_path_id

ilWACPath::$secure_path_id = ''
protected

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

Referenced by getSecurePathId(), and setSecurePathId().

◆ $suffix

ilWACPath::$suffix = ''
protected

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

Referenced by getSuffix(), and setSuffix().

◆ $timestamp

ilWACPath::$timestamp = 0
protected

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

Referenced by getTimestamp(), and setTimestamp().

◆ $token

ilWACPath::$token = ''
protected

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

Referenced by getToken(), and setToken().

◆ $ttl

ilWACPath::$ttl = 0
protected

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

Referenced by getTTL(), and setTTL().

◆ $video_suffixes

ilWACPath::$video_suffixes
staticprotected
Initial value:
= array(
'mp4',
'm4v',
'mov',
'wmv',
'webm',
)

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

Referenced by setVideoSuffixes().

◆ DIR_DATA

const ilWACPath::DIR_DATA = "data"

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

◆ DIR_SEC

const ilWACPath::DIR_SEC = "sec"

Definition at line 27 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 31 of file class.ilWACPath.php.


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