src/Exception/ClassLoaderException.php 1 location
|
@@ 20-32 (lines=13) @@
|
17 |
|
* |
18 |
|
* @codeCoverageIgnore |
19 |
|
*/ |
20 |
|
class ClassLoaderException extends Exception { |
21 |
|
|
22 |
|
const MESSAGE_PRIORITY_INCREASE_OVERLOAD = "The priority cannot be increased more!"; |
23 |
|
|
24 |
|
public static function priorityIncreaseLimit() { |
25 |
|
return new self(self::MESSAGE_PRIORITY_INCREASE_OVERLOAD); |
26 |
|
} |
27 |
|
|
28 |
|
public function __construct($message = "", $code = 0, \Exception $previous = NULL) { |
29 |
|
parent::__construct($message, $code, $previous); |
30 |
|
} |
31 |
|
|
32 |
|
} |
33 |
|
|
src/Modules/Map/MapModuleException.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* |
18 |
|
* @codeCoverageIgnore |
19 |
|
*/ |
20 |
|
class MapModuleException extends Exception { |
21 |
|
|
22 |
|
const MESSAGE_MAP_NAME_OCCUPIED = "The following map name is already occupied: %s"; |
23 |
|
|
24 |
|
/** |
25 |
|
* Used when try to register map with name that already registered in the loader |
26 |
|
* |
27 |
|
* @param string $mapName The map name |
28 |
|
* |
29 |
|
* @return static |
30 |
|
*/ |
31 |
|
public static function mapNameOccupied($mapName) { |
32 |
|
return new static(sprintf(static::MESSAGE_MAP_NAME_OCCUPIED, $mapName)); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @inheritDoc |
37 |
|
*/ |
38 |
|
public function __construct($message = "", $code = 0, Exception $previous = NULL) { |
39 |
|
parent::__construct($message, $code, $previous); |
40 |
|
} |
41 |
|
|
42 |
|
} |
43 |
|
|
src/Modules/PEAR/PEARModuleException.php 1 location
|
@@ 20-43 (lines=24) @@
|
17 |
|
* |
18 |
|
* @codeCoverageIgnore |
19 |
|
*/ |
20 |
|
class PEARModuleException extends Exception { |
21 |
|
|
22 |
|
const MESSAGE_PREFIX_OCCUPIED = 'This prefix (%s) is already occupied!'; |
23 |
|
|
24 |
|
/** |
25 |
|
* Creates a new instance of this exception when is thrown when trying to register |
26 |
|
* the same prefix twice into loader |
27 |
|
* |
28 |
|
* @param string $prefix The registered prefix |
29 |
|
* |
30 |
|
* @return static |
31 |
|
*/ |
32 |
|
public static function prefixOccupied($prefix) { |
33 |
|
return new static(sprintf(static::MESSAGE_PREFIX_OCCUPIED, $prefix)); |
34 |
|
} |
35 |
|
|
36 |
|
/** |
37 |
|
* @inheritDoc |
38 |
|
*/ |
39 |
|
public function __construct($message = "", $code = 0, Exception $previous = NULL) { |
40 |
|
parent::__construct($message, $code, $previous); |
41 |
|
} |
42 |
|
|
43 |
|
} |
44 |
|
|
src/Modules/PSR4/PSR4ModuleException.php 1 location
|
@@ 20-39 (lines=20) @@
|
17 |
|
* |
18 |
|
* @codeCoverageIgnore |
19 |
|
*/ |
20 |
|
class PSR4ModuleException extends Exception { |
21 |
|
|
22 |
|
const MESSAGE_NAMESPACE_OCCUPIED = 'This namespace (%s) is already registered!'; |
23 |
|
|
24 |
|
/** |
25 |
|
* Throws a new namespace occupied exception |
26 |
|
* |
27 |
|
* @param string $namespace The occupied namespace name |
28 |
|
* |
29 |
|
* @return \BuildR\ClassLoader\Modules\PSR4\PSR4ModuleException |
30 |
|
*/ |
31 |
|
public static function namespaceOccupied($namespace) { |
32 |
|
return new static(sprintf(static::MESSAGE_NAMESPACE_OCCUPIED, $namespace)); |
33 |
|
} |
34 |
|
|
35 |
|
public function __construct($message = "", $code = 0, Exception $previous = NULL) { |
36 |
|
parent::__construct($message, $code, $previous); |
37 |
|
} |
38 |
|
|
39 |
|
} |
40 |
|
|
src/Modules/Transformable/TransformableModuleException.php 1 location
|
@@ 20-42 (lines=23) @@
|
17 |
|
* |
18 |
|
* @codeCoverageIgnore |
19 |
|
*/ |
20 |
|
class TransformableModuleException extends Exception { |
21 |
|
|
22 |
|
const MESSAGE_NAME_OCCUPIED = "Transformer is already registered with name: %s"; |
23 |
|
|
24 |
|
/** |
25 |
|
* Used when try to register transformer with same name |
26 |
|
* |
27 |
|
* @param string $name The transformer name |
28 |
|
* |
29 |
|
* @return static |
30 |
|
*/ |
31 |
|
public static function nameOccupied($name) { |
32 |
|
return new static(sprintf(static::MESSAGE_NAME_OCCUPIED, $name)); |
33 |
|
} |
34 |
|
|
35 |
|
/** |
36 |
|
* @inheritDoc |
37 |
|
*/ |
38 |
|
public function __construct($message = "", $code = 0, Exception $previous = NULL) { |
39 |
|
parent::__construct($message, $code, $previous); |
40 |
|
} |
41 |
|
|
42 |
|
} |
43 |
|
|