當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。