ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilWACPath Class Reference

Class ilWACPath. 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

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 10 of file class.ilWACPath.php.

Constructor & Destructor Documentation

◆ __construct()

ilWACPath::__construct (   $path)

ilWACPath constructor.

Parameters
string$path

Definition at line 131 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().

132  {
133  assert(is_string($path));
134  $this->setOriginalRequest($path);
135  $re = '/' . self::REGEX . '/';
136  preg_match($re, $path, $result);
137 
138  foreach ($result as $k => $v) {
139  if (is_numeric($k)) {
140  unset($result[$k]);
141  }
142  }
143 
144  $moduleId = strstr(is_null($result['module_identifier']) ? '' : $result['module_identifier'], "/", true);
145  $moduleId = $moduleId === false ? '' : $moduleId;
146 
147  $this->setPrefix(is_null($result['prefix']) ? '' : $result['prefix']);
148  $this->setClient(is_null($result['client']) ? '' : $result['client']);
149  $this->setAppendix(is_null($result['appendix']) ? '' : $result['appendix']);
150  $this->setModuleIdentifier($moduleId);
151  $this->setModuleType(is_null($result['module_type']) ? '' : $result['module_type']);
152 
153  $modulePath = null;
154 
155  if ($this->getModuleIdentifier()) {
156  $modulePath = strstr(is_null($result['module_path']) ? '' : $result['module_path'], $this->getModuleIdentifier(), true);
157  $modulePath = '.' . ($modulePath === false ? '' : $modulePath);
158  } else {
159  $modulePath = ('.' . (is_null($result['module_path']) ? '' : $result['module_path']));
160  }
161 
162  $this->setModulePath("$modulePath");
163  $this->setInSecFolder($result['sec'] === 'sec/');
164  $this->setPathWithoutQuery('.'
165  . (is_null($result['path_without_query']) ? '' : $result['path_without_query']));
166  $this->setPath('.' . (is_null($result['path']) ? '' : $result['path']));
167  $this->setSecurePath('.'
168  . (is_null($result['secure_path_id']) ? '' : $result['secure_path_id']));
169  $this->setSecurePathId(is_null($result['module_type']) ? '' : $result['module_type']);
170  // Pathinfo
171  $parts = parse_url($path);
172  $this->setFileName(basename($parts['path']));
173  if (isset($parts['query'])) {
174  $parts_query = $parts['query'];
175  $this->setQuery($parts_query);
176  parse_str($parts_query, $query);
177  $this->setParameters($query);
178  }
179  $this->setSuffix(pathinfo($parts['path'], PATHINFO_EXTENSION));
180  $this->handleParameters();
181  }
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 414 of file class.ilWACPath.php.

References getPathWithoutQuery().

415  {
416  return (bool) is_file($this->getPathWithoutQuery());
417  }
+ Here is the call graph for this function:

◆ getAppendix()

ilWACPath::getAppendix ( )
Returns
string

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

References $appendix.

294  {
295  return (string) $this->appendix;
296  }

◆ getAudioSuffixes()

static ilWACPath::getAudioSuffixes ( )
static
Returns
array

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

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

◆ getCleanURLdecodedPath()

ilWACPath::getCleanURLdecodedPath ( )

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

Returns
string

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

References $path.

559  {
560  $path = explode("?", (string) $this->path); // removing everything behind ?
561  $path_to_file = rawurldecode($path[0]);
562 
563  return $path_to_file;
564  }

◆ getClient()

ilWACPath::getClient ( )
Returns
string

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

References $client.

510  {
511  return (string) $this->client;
512  }

◆ getDirName()

ilWACPath::getDirName ( )
Returns
string

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

References getPathWithoutQuery().

332  {
333  return (string) dirname($this->getPathWithoutQuery());
334  }
+ Here is the call graph for this function:

◆ getFileName()

ilWACPath::getFileName ( )
Returns
string

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

References $file_name.

Referenced by ilObjUserAccess\canBeDelivered().

600  {
601  return (string) $this->file_name;
602  }
+ Here is the caller graph for this function:

◆ getImageSuffixes()

static ilWACPath::getImageSuffixes ( )
static
Returns
array

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

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

◆ getModuleIdentifier()

ilWACPath::getModuleIdentifier ( )
Returns
string

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

References $module_identifier.

Referenced by __construct().

695  {
696  return (string) $this->module_identifier;
697  }
+ Here is the caller graph for this function:

◆ getModulePath()

ilWACPath::getModulePath ( )
Returns
string

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

References $module_path.

313  {
314  return (string) $this->module_path;
315  }

◆ getModuleType()

ilWACPath::getModuleType ( )
Returns
string

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

References $module_type.

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

676  {
677  return (string) $this->module_type;
678  }
+ Here is the caller graph for this function:

◆ getOriginalRequest()

ilWACPath::getOriginalRequest ( )
Returns
string

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

References $original_request.

619  {
620  return (string) $this->original_request;
621  }

◆ getParameters()

ilWACPath::getParameters ( )
Returns
array

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

References $parameters.

Referenced by handleParameters().

203  {
204  return (array) $this->parameters;
205  }
+ Here is the caller graph for this function:

◆ getPath()

◆ getPathWithoutQuery()

ilWACPath::getPathWithoutQuery ( )
Returns
string

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

References $path_without_query.

Referenced by fileExists(), and getDirName().

341  {
342  return (string) $this->path_without_query;
343  }
+ Here is the caller graph for this function:

◆ getPrefix()

ilWACPath::getPrefix ( )
Returns
string

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

References $prefix.

275  {
276  return (string) $this->prefix;
277  }

◆ getQuery()

ilWACPath::getQuery ( )
Returns
string

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

References $query.

581  {
582  return (string) $this->query;
583  }

◆ getSecurePath()

ilWACPath::getSecurePath ( )
Returns
string

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

References $secure_path.

638  {
639  return (string) $this->secure_path;
640  }

◆ getSecurePathId()

ilWACPath::getSecurePathId ( )
Returns
string

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

References $secure_path_id.

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

529  {
530  return (string) $this->secure_path_id;
531  }
+ Here is the caller graph for this function:

◆ getSuffix()

ilWACPath::getSuffix ( )
Returns
string

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

References $suffix.

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

369  {
370  return (string) $this->suffix;
371  }
+ Here is the caller graph for this function:

◆ getTimestamp()

ilWACPath::getTimestamp ( )
Returns
int

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

References $timestamp.

471  {
472  return (int) $this->timestamp;
473  }

◆ getToken()

ilWACPath::getToken ( )
Returns
string

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

References $token.

451  {
452  return (string) $this->token;
453  }

◆ getTTL()

ilWACPath::getTTL ( )
Returns
int

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

References $ttl.

491  {
492  return (int) $this->ttl;
493  }

◆ getVideoSuffixes()

static ilWACPath::getVideoSuffixes ( )
static
Returns
array

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

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

◆ handleParameters()

ilWACPath::handleParameters ( )
protected

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

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

Referenced by __construct().

185  {
186  $param = $this->getParameters();
187  if (isset($param[ilWACSignedPath::WAC_TOKEN_ID])) {
188  $this->setToken($param[ilWACSignedPath::WAC_TOKEN_ID]);
189  }
190  if (isset($param[ilWACSignedPath::WAC_TIMESTAMP_ID])) {
191  $this->setTimestamp(intval($param[ilWACSignedPath::WAC_TIMESTAMP_ID]));
192  }
193  if (isset($param[ilWACSignedPath::WAC_TTL_ID])) {
194  $this->setTTL(intval($param[ilWACSignedPath::WAC_TTL_ID]));
195  }
196  }
setToken($token)
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 432 of file class.ilWACPath.php.

433  {
434  return (bool) ($this->timestamp !== 0);
435  }

◆ hasToken()

ilWACPath::hasToken ( )
Returns
bool

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

424  {
425  return (bool) ($this->token !== '');
426  }

◆ hasTTL()

ilWACPath::hasTTL ( )
Returns
bool

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

442  {
443  return (bool) ($this->ttl !== 0);
444  }

◆ isAudio()

ilWACPath::isAudio ( )
Returns
bool

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

References getSuffix().

Referenced by isStreamable().

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

◆ isImage()

ilWACPath::isImage ( )
Returns
bool

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

References getSuffix().

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

◆ isInSecFolder()

ilWACPath::isInSecFolder ( )
Returns
bool

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

References $in_sec_folder.

657  {
658  return (bool) $this->in_sec_folder;
659  }

◆ isStreamable()

ilWACPath::isStreamable ( )
Returns
bool

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

References isAudio(), and isVideo().

388  {
389  return (bool) ($this->isAudio() || $this->isVideo());
390  }
+ Here is the call graph for this function:

◆ isVideo()

ilWACPath::isVideo ( )
Returns
bool

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

References getSuffix().

Referenced by isStreamable().

406  {
407  return (bool) in_array(strtolower($this->getSuffix()), self::$video_suffixes);
408  }
+ 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 302 of file class.ilWACPath.php.

References $appendix.

Referenced by __construct().

303  {
304  assert(is_string($appendix));
305  $this->appendix = $appendix;
306  }
+ Here is the caller graph for this function:

◆ setAudioSuffixes()

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

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

References $audio_suffixes.

230  {
231  self::$audio_suffixes = $audio_suffixes;
232  }
static $audio_suffixes

◆ setClient()

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

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

References $client.

Referenced by __construct().

519  {
520  assert(is_string($client));
521  $this->client = $client;
522  }
+ Here is the caller graph for this function:

◆ setFileName()

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

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

References $file_name.

Referenced by __construct().

609  {
610  assert(is_string($file_name));
611  $this->file_name = $file_name;
612  }
+ Here is the caller graph for this function:

◆ setImageSuffixes()

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

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

References $image_suffixes.

248  {
249  self::$image_suffixes = $image_suffixes;
250  }
static $image_suffixes

◆ setInSecFolder()

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

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

References $in_sec_folder.

Referenced by __construct().

666  {
667  assert(is_bool($in_sec_folder));
668  $this->in_sec_folder = $in_sec_folder;
669  }
+ Here is the caller graph for this function:

◆ setModuleIdentifier()

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

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

References $module_identifier.

Referenced by __construct().

704  {
705  assert(is_string($module_identifier));
706  $this->module_identifier = $module_identifier;
707  }
+ Here is the caller graph for this function:

◆ setModulePath()

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

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

References $module_path.

Referenced by __construct().

322  {
323  assert(is_string($module_path));
324  $this->module_path = $module_path;
325  }
+ Here is the caller graph for this function:

◆ setModuleType()

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

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

References $module_type.

Referenced by __construct().

685  {
686  assert(is_string($module_type));
687  $this->module_type = $module_type;
688  }
+ Here is the caller graph for this function:

◆ setOriginalRequest()

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

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

References $original_request.

Referenced by __construct().

628  {
629  assert(is_string($original_request));
630  $this->original_request = $original_request;
631  }
+ Here is the caller graph for this function:

◆ setParameters()

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

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

References $parameters.

Referenced by __construct().

212  {
213  $this->parameters = $parameters;
214  }
+ Here is the caller graph for this function:

◆ setPath()

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

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

References $path.

Referenced by __construct().

571  {
572  assert(is_string($path));
573  $this->path = $path;
574  }
+ Here is the caller graph for this function:

◆ setPathWithoutQuery()

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

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

References $path_without_query.

Referenced by __construct().

350  {
351  assert(is_string($path_without_query));
352  $this->path_without_query = $path_without_query;
353  }
+ Here is the caller graph for this function:

◆ setPrefix()

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

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

References $prefix.

Referenced by __construct().

284  {
285  assert(is_string($prefix));
286  $this->prefix = $prefix;
287  }
+ Here is the caller graph for this function:

◆ setQuery()

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

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

References $query.

Referenced by __construct().

590  {
591  assert(is_string($query));
592  $this->query = $query;
593  }
+ Here is the caller graph for this function:

◆ setSecurePath()

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

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

References $secure_path.

Referenced by __construct().

647  {
648  assert(is_string($secure_path));
649  $this->secure_path = $secure_path;
650  }
+ Here is the caller graph for this function:

◆ setSecurePathId()

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

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

References $secure_path_id.

Referenced by __construct().

538  {
539  assert(is_string($secure_path_id));
540  $this->secure_path_id = $secure_path_id;
541  }
+ Here is the caller graph for this function:

◆ setSuffix()

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

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

References $suffix.

Referenced by __construct().

378  {
379  assert(is_string($suffix));
380  $this->suffix = $suffix;
381  }
+ Here is the caller graph for this function:

◆ setTimestamp()

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

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

References $timestamp, and ilWACSignedPath\WAC_TIMESTAMP_ID.

Referenced by handleParameters().

480  {
481  assert(is_int($timestamp));
482  $this->parameters[ilWACSignedPath::WAC_TIMESTAMP_ID] = $timestamp;
483  $this->timestamp = $timestamp;
484  }
+ Here is the caller graph for this function:

◆ setToken()

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

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

References $token, and ilWACSignedPath\WAC_TOKEN_ID.

Referenced by handleParameters().

460  {
461  assert(is_string($token));
462  $this->parameters[ilWACSignedPath::WAC_TOKEN_ID] = $token;
463  $this->token = $token;
464  }
+ Here is the caller graph for this function:

◆ setTTL()

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

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

References $ttl, and ilWACSignedPath\WAC_TTL_ID.

Referenced by handleParameters().

500  {
501  $this->parameters[ilWACSignedPath::WAC_TTL_ID] = $ttl;
502  $this->ttl = $ttl;
503  }
+ Here is the caller graph for this function:

◆ setVideoSuffixes()

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

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

References $video_suffixes.

266  {
267  self::$video_suffixes = $video_suffixes;
268  }
static $video_suffixes

Field Documentation

◆ $appendix

ilWACPath::$appendix = ''
protected

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

Referenced by setAudioSuffixes().

◆ $client

ilWACPath::$client = ''
protected

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

Referenced by getClient(), and setClient().

◆ $file_name

ilWACPath::$file_name = ''
protected

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

Referenced by setImageSuffixes().

◆ $in_sec_folder

ilWACPath::$in_sec_folder = false
protected

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

Referenced by isInSecFolder(), and setInSecFolder().

◆ $module_identifier

ilWACPath::$module_identifier = ''
protected

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

Referenced by getModuleIdentifier(), and setModuleIdentifier().

◆ $module_path

ilWACPath::$module_path = ''
protected

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

Referenced by getModulePath(), and setModulePath().

◆ $module_type

ilWACPath::$module_type = ''
protected

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

Referenced by getModuleType(), and setModuleType().

◆ $original_request

ilWACPath::$original_request = ''
protected

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

Referenced by getOriginalRequest(), and setOriginalRequest().

◆ $parameters

ilWACPath::$parameters = array()
protected

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

Referenced by getParameters(), and setParameters().

◆ $path

ilWACPath::$path = ''
protected

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

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

◆ $path_without_query

ilWACPath::$path_without_query = ''
protected

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

Referenced by getPathWithoutQuery(), and setPathWithoutQuery().

◆ $prefix

ilWACPath::$prefix = ''
protected

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

Referenced by getPrefix(), and setPrefix().

◆ $query

ilWACPath::$query = ''
protected

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

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

◆ $secure_path

ilWACPath::$secure_path = ''
protected

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

Referenced by getSecurePath(), and setSecurePath().

◆ $secure_path_id

ilWACPath::$secure_path_id = ''
protected

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

Referenced by getSecurePathId(), and setSecurePathId().

◆ $suffix

ilWACPath::$suffix = ''
protected

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

Referenced by getSuffix(), and setSuffix().

◆ $timestamp

ilWACPath::$timestamp = 0
protected

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

Referenced by getTimestamp(), and setTimestamp().

◆ $token

ilWACPath::$token = ''
protected

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

Referenced by getToken(), and setToken().

◆ $ttl

ilWACPath::$ttl = 0
protected

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

Referenced by setVideoSuffixes().

◆ DIR_DATA

const ilWACPath::DIR_DATA = "data"

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

◆ DIR_SEC

const ilWACPath::DIR_SEC = "sec"

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


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