1 | <?php |
||
19 | class RenderController extends \yii\web\Controller |
||
20 | { |
||
21 | public function getViewPath() |
||
25 | |||
26 | /** |
||
27 | * Index action. |
||
28 | * @param string|null $page |
||
29 | * @return string rendered page |
||
30 | * @throws NotFoundHttpException |
||
31 | * @throws \yii\base\InvalidConfigException |
||
32 | */ |
||
33 | public function actionIndex(string $page = null): string |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | * @throws \yii\base\InvalidConfigException |
||
51 | */ |
||
52 | private function getPageName(): string |
||
58 | |||
59 | /** |
||
60 | * @param AbstractPage $page |
||
61 | * @param array $params |
||
62 | * @return string |
||
63 | */ |
||
64 | private function renderPage(AbstractPage $page, array $params = []): string |
||
77 | |||
78 | /** |
||
79 | * @param string|null $id |
||
80 | * @return string |
||
81 | */ |
||
82 | public function actionList(string $id = null): string |
||
88 | } |
||
89 |
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: