@@ 18-32 (lines=15) @@ | ||
15 | * Exception for when there is a problem reading a file: the file is not a file |
|
16 | * or there is not "read" permission |
|
17 | */ |
|
18 | class BadFileException extends \InvalidArgumentException |
|
19 | { |
|
20 | private $resourcefile; |
|
21 | ||
22 | public function __construct(string $message = '', string $resourcefile = null, \Exception $previous = null) |
|
23 | { |
|
24 | parent::__construct($message, $code = 0, $previous); |
|
25 | $this->resourcefile = $resourcefile; |
|
26 | } |
|
27 | ||
28 | public function getResourcefile() : string |
|
29 | { |
|
30 | return $this->resourcefile; |
|
31 | } |
|
32 | } |
|
33 |
@@ 17-31 (lines=15) @@ | ||
14 | /** |
|
15 | * File not found exception. |
|
16 | */ |
|
17 | class FileNotFoundException extends \InvalidArgumentException |
|
18 | { |
|
19 | private $paths; |
|
20 | ||
21 | public function __construct(string $message = '', int $code = 0, \Exception $previous = null, array $paths = []) |
|
22 | { |
|
23 | parent::__construct($message, $code, $previous); |
|
24 | $this->paths = $paths; |
|
25 | } |
|
26 | ||
27 | public function getPaths() : array |
|
28 | { |
|
29 | return $this->paths; |
|
30 | } |
|
31 | } |
|
32 |