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


PHP ArrayHelper::array2string方法代码示例

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


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

示例1: save_img_src

 /** @public-command-method */
 public function save_img_src($SavedFileRelativePaths, $savedThumbnailFileRelativePaths)
 {
     $serializedPath = ArrayHelper::array2string($SavedFileRelativePaths);
     $serializedThumbnailPath = ArrayHelper::array2string($savedThumbnailFileRelativePaths);
     $illustJustSaved = Event::model()->findByPk($this->id);
     $illustJustSaved->icon_src = $serializedPath;
     $illustJustSaved->icon_thumbnail_src = $serializedThumbnailPath;
     $illustJustSaved->save();
 }
开发者ID:kittolau,项目名称:gcm,代码行数:10,代码来源:Event.php

示例2: actionCreateGroup

 public function actionCreateGroup()
 {
     /* validate all query string param */
     $model = new Group('create');
     $fileModel = new FileUploadFormModel();
     $fileModel->setScenario(FileUploadFormModel::FILE_UPLOAD_MODE_SINGLE);
     /*define the required variable for the controller base on the query string param */
     if (isset($_POST['Group'])) {
         $model->setAttributes($_POST['Group']);
         //$fileHandler->LoadUploadedeImageToModel();
         //$model->photos = $fileHandler->photos;
         //$model->photos = CUploadedFile::getInstancesByName(BSMultiFileUploadWidget::fieldName);
         if ($model->validate()) {
             $fileModel->LoadUploadedeImage();
             if ($fileModel->isUploadedFile()) {
                 if ($fileModel->validate()) {
                     $SavedFileRelativePaths = $fileModel->processImage(get_class($model), $model->group_name, md5(DateTimeHelper::now()));
                     $model->apply_img = ArrayHelper::array2string($SavedFileRelativePaths);
                     if ($model->save()) {
                         $model->addOwnerUser(Yii::app()->user->id);
                         Yii::app()->user->setFlash(FlashMsg::SUCCESS, "已提交組織申請");
                         $this->redirect(array('index'));
                     } else {
                         Yii::app()->user->setFlash(FlashMsg::ERROR, "提交組織申請失敗");
                     }
                 }
             } else {
                 if ($model->save()) {
                     $model->addOwnerUser(Yii::app()->user->id);
                     Yii::app()->user->setFlash(FlashMsg::SUCCESS, "已提交組織申請");
                     $this->redirect(array('index'));
                 } else {
                     Yii::app()->user->setFlash(FlashMsg::ERROR, "提交組織申請失敗");
                 }
             }
         }
     }
     $this->render('createGroup', array('model' => $model, 'fileModel' => $fileModel));
 }
开发者ID:kittolau,项目名称:gcm,代码行数:39,代码来源:MemberCenterController.php

示例3: prependSymbol

 public function prependSymbol($tags_string)
 {
     if (isset($tags_string) && $tags_string !== "") {
         $tag_arr = ArrayHelper::string2array($tags_string);
         $processed_tag_arr = array();
         foreach ($tag_arr as $tag) {
             array_push($processed_tag_arr, Illust::uniqueTagPrefix . $tag);
         }
         return ArrayHelper::array2string($processed_tag_arr);
     }
     return "";
 }
开发者ID:kittolau,项目名称:gcm,代码行数:12,代码来源:Illust.php

示例4: actionUpdate

 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate($id)
 {
     $model = Group::model()->findByPk($id);
     $currentUesrId = Yii::App()->user->id;
     if (!$model->isGroupOwners($currentUesrId)) {
         throw new CHttpException(404, "You are not the owner");
     }
     $fileModel = new FileUploadFormModel();
     $fileModel->setScenario(FileUploadFormModel::FILE_UPLOAD_MODE_SINGLE);
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Group'])) {
         $model->setScenario('update');
         $model->setAttributes($_POST['Group']);
         if ($model->validate()) {
             $fileModel->LoadUploadedeImage();
             if ($fileModel->isUploadedFile()) {
                 if ($fileModel->validate()) {
                     $SavedFileRelativePaths = $fileModel->processImage(get_class($model), $model->group_name, md5(DateTimeHelper::now()));
                     $model->icon_src = ArrayHelper::array2string($SavedFileRelativePaths);
                     if ($model->save()) {
                         Yii::app()->user->setFlash(FlashMsg::SUCCESS, "組織資料已更新");
                         $this->redirect(array('index'));
                     } else {
                         Yii::app()->user->setFlash(FlashMsg::ERROR, "更新組織資料失敗");
                     }
                 } else {
                     $this->render('updateUser', array('model' => $model, 'fileModel' => $fileModel));
                 }
             }
             if ($model->save()) {
                 Yii::app()->user->setFlash(FlashMsg::SUCCESS, "組織資料已更新");
                 $this->redirect(array('index'));
             }
         }
     }
     $this->render('update', array('model' => $model, 'fileModel' => $fileModel));
 }
开发者ID:kittolau,项目名称:gcm,代码行数:43,代码来源:GroupController.php

示例5: save_img_src

 public function save_img_src($SavedFileRelativePaths, $SavedThumbnailPath)
 {
     $serializedPath = ArrayHelper::array2string($SavedFileRelativePaths);
     $serializedThumbnailPath = ArrayHelper::array2string($SavedThumbnailPath);
     $illustJustSaved = GroupProduct::model()->findByPk($this->id);
     $illustJustSaved->setScenario('processingImage');
     $illustJustSaved->img_src = $serializedPath;
     $illustJustSaved->thumbnail_src = $serializedThumbnailPath;
     $illustJustSaved->save();
 }
开发者ID:kittolau,项目名称:gcm,代码行数:10,代码来源:GroupProduct.php


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