ILIAS  release_8 Revision v8.24
class.ilWACException.php
Go to the documentation of this file.
1<?php
25{
26 public const CODE_NO_TYPE = 9001;
27 public const CODE_NO_PATH = 9002;
28 public const ACCESS_WITHOUT_CHECK = 9003;
29 public const NO_CHECKING_INSTANCE = 9004;
30 public const WRONG_PATH_TYPE = 9005;
31 public const INITIALISATION_FAILED = 9006;
32 public const DATA_DIR_NON_WRITEABLE = 9007;
33 public const ACCESS_DENIED = 9010;
34 public const ACCESS_DENIED_NO_PUB = 9011;
35 public const ACCESS_DENIED_NO_LOGIN = 9012;
36 public const MAX_LIFETIME = 9013;
37 public const NOT_FOUND = 9014;
41 protected static array $messages = [
42 self::CODE_NO_TYPE => 'No type for Path-Signing selected',
43 self::WRONG_PATH_TYPE => 'This path-type cannot be signed',
44 self::CODE_NO_PATH => 'No path for checking available',
45 self::ACCESS_WITHOUT_CHECK => 'Resource could not be found',
46 self::NO_CHECKING_INSTANCE => 'This path is not secured by a class',
47 self::ACCESS_DENIED => 'Resource could not be found',
48 self::ACCESS_DENIED_NO_PUB => 'Resource could not be found',
49 self::INITIALISATION_FAILED => 'An error occured during your request. Please reload the page.',
50 self::DATA_DIR_NON_WRITEABLE => 'The SALT cannot be written to your /data directory. Please check the write permissions on the webserver.',
51 self::MAX_LIFETIME => 'You can only only use lifetimes shorter than ilWACSignedPath::MAX_LIFETIME',
52 self::ACCESS_DENIED_NO_LOGIN => 'No Login found',
53 self::NOT_FOUND => 'Resource not Found',
54 ];
55
56
61 public function __construct($code, $additional_message = '', Throwable $previous = null)
62 {
63 $message = self::$messages[$code] ?? 'Unknown error';
64 if (!empty($additional_message)) {
65 $message .= ': ' . $additional_message;
66 }
67 parent::__construct($message, $code, $previous);
68 }
69}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static array $messages
__construct($code, $additional_message='', Throwable $previous=null)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$messages
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: xapiexit.php:22
$message
Definition: xapiexit.php:32