1 | <?php |
||
15 | class DefaultController extends Controller |
||
16 | { |
||
17 | //todo 前缀名要修改 |
||
18 | public function actions() |
||
31 | |||
32 | /** |
||
33 | * Lists all Post models. |
||
34 | * @return mixed |
||
35 | */ |
||
36 | public function actionIndex() |
||
51 | |||
52 | /** |
||
53 | * Displays a single Post model. |
||
54 | * @param integer $id |
||
55 | * @return mixed |
||
56 | */ |
||
57 | public function actionView($id) |
||
63 | |||
64 | /** |
||
65 | * Creates a new Post model. |
||
66 | * If creation is successful, the browser will be redirected to the 'view' page. |
||
67 | * @return mixed |
||
68 | */ |
||
69 | public function actionCreate() |
||
81 | |||
82 | /** |
||
83 | * Updates an existing Post model. |
||
84 | * If update is successful, the browser will be redirected to the 'view' page. |
||
85 | * @param integer $id |
||
86 | * @return mixed |
||
87 | */ |
||
88 | public function actionUpdate($id) |
||
100 | |||
101 | /** |
||
102 | * Deletes an existing Post model. |
||
103 | * If deletion is successful, the browser will be redirected to the 'index' page. |
||
104 | * @param integer $id |
||
105 | * @return mixed |
||
106 | */ |
||
107 | public function actionDelete($id) |
||
113 | |||
114 | /** |
||
115 | * Finds the Post model based on its primary key value. |
||
116 | * If the model is not found, a 404 HTTP exception will be thrown. |
||
117 | * @param integer $id |
||
118 | * @return Post the loaded model |
||
119 | * @throws NotFoundHttpException if the model cannot be found |
||
120 | */ |
||
121 | protected function findModel($id) |
||
129 | |||
130 | |||
131 | /** |
||
132 | * @brief 修改文章状态1显示:0不显示 |
||
133 | * @param $id |
||
134 | * @param $status |
||
135 | * @return |
||
136 | */ |
||
137 | public function actionStatus($id, $status) |
||
150 | } |
||
151 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.