1 | <?php |
||
30 | 1 | class Configuration |
|
31 | { |
||
32 | /** |
||
33 | * Implement nette smart magic |
||
34 | */ |
||
35 | 1 | use Nette\SmartObject; |
|
36 | |||
37 | /** |
||
38 | * @var string|NULL |
||
39 | */ |
||
40 | private $redirectUrl; |
||
41 | |||
42 | /** |
||
43 | * @var Application\LinkGenerator |
||
44 | */ |
||
45 | private $linkGenerator; |
||
46 | |||
47 | /** |
||
48 | * @param string|NULL $redirectUrl |
||
49 | * @param Application\LinkGenerator $linkGenerator |
||
50 | */ |
||
51 | public function __construct(?string $redirectUrl = NULL, Application\LinkGenerator $linkGenerator) |
||
56 | |||
57 | /** |
||
58 | * Build the URL for redirection if is set |
||
59 | * |
||
60 | * @param array $params |
||
61 | * |
||
62 | * @return string|NULL |
||
63 | * |
||
64 | * @throws Application\UI\InvalidLinkException |
||
65 | */ |
||
66 | public function getRedirectUrl(array $params = []) : ?string |
||
74 | } |
||
75 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: