1 | <?php |
||
23 | class TermController extends Controller |
||
24 | { |
||
25 | /** |
||
26 | * Displays a single Term model. |
||
27 | * |
||
28 | * @param integer $id Term ID |
||
29 | * @param null $slug Term slug |
||
30 | * @throws \yii\web\NotFoundHttpException |
||
31 | * @return mixed |
||
32 | */ |
||
33 | public function actionView($id = null, $slug = null) |
||
68 | |||
69 | /** |
||
70 | * Finds the Post model based on its primary key value. |
||
71 | * If the model is not found, a 404 HTTP exception will be thrown. |
||
72 | * |
||
73 | * @param integer $id Term ID |
||
74 | * @return Term the loaded model |
||
75 | * @throws NotFoundHttpException if the model cannot be found |
||
76 | */ |
||
77 | protected function findModel($id) |
||
87 | |||
88 | /** |
||
89 | * Finds the Post model based on its primary key value. |
||
90 | * If the model is not found, a 404 HTTP exception will be thrown. |
||
91 | * |
||
92 | * @param string $slug Term Slug |
||
93 | * @throws \yii\web\NotFoundHttpException |
||
94 | * @internal param string $postslug |
||
95 | * @return Term the loaded model |
||
96 | */ |
||
97 | protected function findModelBySlug($slug) |
||
107 | } |
||
108 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
integer
values, zero is a special case, in particular the following results might be unexpected: