当前位置: 首页>>代码示例>>PHP>>正文


PHP StringHelper::filterArrayString方法代码示例

本文整理汇总了PHP中StringHelper::filterArrayString方法的典型用法代码示例。如果您正苦于以下问题:PHP StringHelper::filterArrayString方法的具体用法?PHP StringHelper::filterArrayString怎么用?PHP StringHelper::filterArrayString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StringHelper的用法示例。


在下文中一共展示了StringHelper::filterArrayString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: actionEditProcess

 public function actionEditProcess()
 {
     try {
         $post = StringHelper::filterArrayString($_POST);
         $path = null;
         if (isset($_FILES['file'])) {
             $path = UploadHelper::getUrlUploadSingleImage($_FILES['file'], 'file');
         }
         $result = Document::model()->edit($_POST, $path);
         if ($result == 1) {
             Yii::app()->user->setFlash('success', 'Cập nhật dữ liệu thành công !');
             $this->redirect(Yii::app()->createUrl('document/edit', array('id' => $post['id'])));
         } else {
             if ($result == 2) {
                 Yii::app()->user->setFlash('error', 'Cập nhật dữ liệu thất bại !');
                 $this->redirect(Yii::app()->createUrl('document/edit', array('id' => $post['id'])));
             } else {
                 Yii::app()->user->setFlash('error', 'Không tồn tại tài liệu !');
                 $this->redirect(Yii::app()->createUrl('document/edit', array('id' => $post['id'])));
             }
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:vksnd,代码行数:25,代码来源:DocumentController.php

示例2: actionAddDoctor

 public function actionAddDoctor()
 {
     try {
         $attr = StringHelper::filterArrayString($_POST);
         Doctors::model()->addDoctor($attr);
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:soyba,代码行数:9,代码来源:DoctorController.php

示例3: actionAdd

 public function actionAdd()
 {
     $attr = StringHelper::filterArrayString($_POST);
     if (Comment::model()->add($attr['post_id'], $attr['user_id'], $attr['content'])) {
         ResponseHelper::JsonReturnSuccess('', 'success');
     } else {
         ResponseHelper::JsonReturnError('', 'server error');
     }
 }
开发者ID:uethackathon,项目名称:uethackathon2015_team4,代码行数:9,代码来源:CommentController.php

示例4: actionLogin

 public function actionLogin()
 {
     $attr = StringHelper::filterArrayString($_POST);
     $data = User::model()->login($attr);
     if ($data) {
         ResponseHelper::JsonReturnSuccess($data, 'success');
     } else {
         ResponseHelper::JsonReturnError('', 'server error');
     }
 }
开发者ID:huynt57,项目名称:uet-hackathon,代码行数:10,代码来源:UserController.php

示例5: actionUpdateProfile

 public function actionUpdateProfile()
 {
     $attr = StringHelper::filterArrayString($_POST);
     $obj_file = null;
     if (isset($_FILES['avatar'])) {
         $obj_file = $_FILES['avatar'];
     }
     $message = User::model()->updateProfile($attr, $obj_file);
     ResponseHelper::JsonReturnSuccess('', $message);
 }
开发者ID:uethackathon,项目名称:uethackathon2015_team4,代码行数:10,代码来源:UserController.php

示例6: actionOrder

 public function actionOrder()
 {
     $post = StringHelper::filterArrayString($_POST);
     $result = OrderMedlatec::model()->add($post);
     if ($result != FALSE) {
         ResponseHelper::JsonReturnSuccess($result, 'Success');
     } else {
         ResponseHelper::JsonReturnError('', 'Error');
     }
 }
开发者ID:huynt57,项目名称:soyba,代码行数:10,代码来源:MedlatecController.php

示例7: actionAddSuggestion

 public function actionAddSuggestion()
 {
     $args = StringHelper::filterArrayString($_POST);
     $data = QuizSuggestion::model()->add($args);
     if ($data) {
         ResponseHelper::JsonReturnSuccess($data);
     } else {
         ResponseHelper::JsonReturnError('');
     }
 }
开发者ID:huynt57,项目名称:quizder,代码行数:10,代码来源:QuizSuggestionController.php

示例8: actionAddPharmacy

 public function actionAddPharmacy()
 {
     $attr = StringHelper::filterArrayString($_POST);
     $model = new Pharmacy();
     $model->setAttributes($attr);
     // $model->created_at = time();
     //$model->updated_at = time();
     if ($model->save(FALSE)) {
         ResponseHelper::JsonReturnSuccess("", "Success");
     } else {
         ResponseHelper::JsonReturnError("", "Server Error");
     }
 }
开发者ID:huynt57,项目名称:meboo_nhaplieu,代码行数:13,代码来源:UserController.php

示例9: actionAddCategory

 public function actionAddCategory()
 {
     try {
         $attr = StringHelper::filterArrayString($_POST);
         if (Categories::model()->addCategory($attr)) {
             ResponseHelper::JsonReturnSuccess('', 'Success');
         } else {
             ResponseHelper::JsonReturnSuccess('', 'Error');
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:fashion,代码行数:13,代码来源:CategoryController.php

示例10: actionAdd

 public function actionAdd()
 {
     $attr = StringHelper::filterArrayString($_POST);
     $image = null;
     if (isset($_FILES['image'])) {
         $image = $_FILES['image'];
     }
     if (Post::model()->add($attr, $image)) {
         ResponseHelper::JsonReturnSuccess('', 'success');
     } else {
         ResponseHelper::JsonReturnError('', 'server error');
     }
 }
开发者ID:uethackathon,项目名称:uethackathon2015_team4,代码行数:13,代码来源:PostController.php

示例11: actionCreatePharmacy

 public function actionCreatePharmacy()
 {
     try {
         $attr = StringHelper::filterArrayString($_POST);
         if (Pharmacy::model()->createPharmacy($attr)) {
             ResponseHelper::JsonReturnSuccess("", "Success");
         } else {
             ResponseHelper::JsonReturnError("", "Error");
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:soyba,代码行数:13,代码来源:PharmacyController.php

示例12: actionAddUserFeedback

 public function actionAddUserFeedback()
 {
     try {
         $attr = StringHelper::filterArrayString($_POST);
         if (Feedback::model()->addUserFeedback($attr)) {
             ResponseHelper::JsonReturnSuccess('', 'Success');
         } else {
             ResponseHelper::JsonReturnError('', 'Server Error');
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:hatch,代码行数:13,代码来源:FeedbackController.php

示例13: actionEditGame

 public function actionEditGame()
 {
     try {
         $args = StringHelper::filterArrayString($_POST);
         $data = Game::model()->editGame($args);
         if ($data) {
             ResponseHelper::JsonReturnSuccess('');
         } else {
             ResponseHelper::JsonReturnError('');
         }
     } catch (Exception $ex) {
         ResponseHelper::JsonReturnError($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:quizder,代码行数:14,代码来源:GameController.php

示例14: actionAddEvent

 public function actionAddEvent()
 {
     try {
         $attr = StringHelper::filterArrayString($_POST);
         $image = UploadHelper::getUrlUploadSingleImage($_FILES['image'], $_POST['created_by']);
         if (Events::model()->addEvent($attr, $image)) {
             ResponseHelper::JsonReturnSuccess('', 'Success');
         } else {
             ResponseHelper::JsonReturnError('', 'Server Error');
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:hatch,代码行数:14,代码来源:EventController.php

示例15: actionEditRemind

 public function actionEditRemind()
 {
     try {
         $post = StringHelper::filterArrayString($_POST);
         $remind_id = StringHelper::filterString(Yii::app()->request->getPost('remind_id'));
         if (MedicineRemind::model()->editRemind($remind_id, $post)) {
             ResponseHelper::JsonReturnSuccess('', 'Success');
         } else {
             ResponseHelper::JsonReturnError('', 'Error !');
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:soyba,代码行数:14,代码来源:MedicineRemindController.php


注:本文中的StringHelper::filterArrayString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。