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


PHP object::getErrorMessage方法代码示例

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


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

示例1: delete

 /**
  * 删除文章分类
  *
  * @access public
  */
 public function delete()
 {
     if (!($id = Request::input('id'))) {
         return responseJson(Lang::get('common.action_error'));
     }
     if (!is_array($id)) {
         $id = array($id);
     }
     $id = array_map('intval', $id);
     if ($this->tagProcess->delete($id)) {
         $this->setActionLog(['id' => $id]);
         return responseJson(Lang::get('common.action_success'), true);
     }
     return responseJson($this->tagProcess->getErrorMessage());
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:20,代码来源:TagsController.php

示例2: editWorkflowStep

 /**
  * 编辑工作流步骤
  *
  * @param object $data
  * @access public
  * @return boolean true|false
  */
 public function editWorkflowStep(\App\Services\Admin\Workflow\Param\WorkflowStepSave $data)
 {
     if (!isset($data->id)) {
         return $this->setErrorMsg(Lang::get('common.action_error'));
     }
     if (!empty($data['step_level'])) {
         if (!in_array($data['step_level'], array_fetch($this->workflowStepLevelList(), 'step_level'))) {
             return $this->setErrorMsg(Lang::get('common.illegal_operation'));
         }
     }
     $id = $data->id;
     unset($data->id);
     if (!$id) {
         return $this->setErrorMsg(Lang::get('common.illegal_operation'));
     }
     if (!$this->workflowStepValidate->edit($data)) {
         return $this->setErrorMsg($this->workflowStepValidate->getErrorMessage());
     }
     if (!empty($data->code)) {
         $checkCode = $this->workflowStepModel->getWorkflowStepInfo(['code' => $data->code, 'self' => false, 'self_id' => $id]);
         if (!empty($checkCode)) {
             return $this->setErrorMsg(Lang::get('workflow.code_exists'));
         }
     }
     if ($this->workflowStepModel->editWorkflowStep($data->toArray(), $id) !== false) {
         return true;
     }
     return $this->setErrorMsg(Lang::get('common.action_error'));
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:36,代码来源:Process.php

示例3: updateDatasToDatabase

 /**
  * 编辑文章入库处理
  *
  * @access private
  */
 private function updateDatasToDatabase()
 {
     $httpReferer = Session::getOldInput('http_referer');
     $data = (array) Request::input('data');
     $data['tags'] = explode(';', $data['tags']);
     $this->contentSave->setAttributes($data);
     $id = intval(Request::input('id'));
     if ($this->contentProcess->editContent($this->contentSave, $id) !== false) {
         $this->setActionLog(['param' => $this->contentSave]);
         $backUrl = !empty($httpReferer) ? $httpReferer : R('common', 'blog.content.index');
         return Js::locate($backUrl, 'parent');
     }
     return Js::error($this->contentProcess->getErrorMessage());
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:19,代码来源:ContentController.php

示例4: ArtifactFieldSetFactory

 /**
  *  Constructor.
  *
  *	@param	object $ArtifactType The ArtifactType object to which this ArtifactFieldSetFactory is associated
  *	@return	boolean	success.
  */
 function ArtifactFieldSetFactory($ArtifactType)
 {
     $this->Error();
     if ($ArtifactType) {
         if ($ArtifactType->isError()) {
             $this->setError('ArtifactFieldSetFactory:: ' . $ArtifactType->getErrorMessage());
             return false;
         }
         $this->ArtifactType = $ArtifactType;
         $this->ArtifactFieldSets = array();
         $this->fetchData($this->ArtifactType->getID());
     }
     return true;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:20,代码来源:ArtifactFieldSetFactory.class.php

示例5: delete

 /**
  * 删除工作流
  *
  * @access public
  */
 public function delete()
 {
     $id = Request::input('id');
     if (!$id) {
         return responseJson(Lang::get('common.action_error'));
     }
     $id = array_map('intval', (array) $id);
     $info = $this->workflowProcess->workflowInfos(['ids' => $id]);
     if ($this->workflowProcess->deleteWorkflow(['ids' => $id])) {
         $this->setActionLog(['workflowInfo' => $info]);
         return responseJson(Lang::get('common.action_success'), true);
     }
     return responseJson($this->workflowProcess->getErrorMessage());
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:19,代码来源:IndexController.php

示例6: commentReply

 /**
  * 回复评论
  */
 private function commentReply()
 {
     $data['object_id'] = (int) Request::input('objectid');
     $data['object_type'] = (int) Request::input('object_type');
     $data['nickname'] = strip_tags(Request::input('nickname'));
     $data['content'] = strip_tags(Request::input('comment'));
     $data['replyid'] = (int) Request::input('replyid');
     $insertId = $this->commentProcess->addComment($data);
     if ($insertId !== false) {
         $this->setActionLog(['replyid' => $data['replyid'], 'object_id' => $data['object_id'], 'content' => $data['content']]);
         return Js::execute('window.parent.loadComment(' . $insertId . ');');
     }
     return Js::error($this->commentProcess->getErrorMessage()) . Js::execute('window.parent.reloadDialogTitle();');
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:17,代码来源:CommentController.php

示例7: editPosition

 /**
  * 编辑推荐位
  *
  * @param object $data
  * @access public
  * @return boolean true|false
  */
 public function editPosition(\App\Services\Admin\Position\Param\PositionSave $data)
 {
     if (!isset($data['id'])) {
         return $this->setErrorMsg(Lang::get('common.action_error'));
     }
     $id = intval($data['id']);
     unset($data['id']);
     if (!$this->positionValidate->edit($data)) {
         return $this->setErrorMsg($this->positionValidate->getErrorMessage());
     }
     if ($this->positionModel->editPosition($data->toArray(), $id) !== false) {
         return true;
     }
     return $this->setErrorMsg(Lang::get('common.action_error'));
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:22,代码来源:Process.php

示例8: modifyPassword

 /**
  * 修改自己的密码
  * 
  * @param object $params
  * @return true|false
  */
 public function modifyPassword(UserModifyPassword $params)
 {
     if (!$this->userValidate->password($params)) {
         return $this->setErrorMsg($this->userValidate->getErrorMessage());
     }
     $userInfo = SC::getLoginSession();
     if ($userInfo->password != md5($params->oldPassword)) {
         return $this->setErrorMsg(Lang::get('user.old_password_wrong'));
     }
     $updateData = ['password' => md5($params->newPassword)];
     if ($this->userModel->editUser($updateData, $userInfo->id) !== false) {
         return true;
     }
     return $this->setErrorMsg(Lang::get('common.action_error'));
 }
开发者ID:pfdtk,项目名称:bmsys,代码行数:21,代码来源:Process.php

示例9: delrelation

 /**
  * 删除推荐位关联文章
  */
 public function delrelation()
 {
     if (!($prid = Request::input('prid'))) {
         return responseJson(Lang::get('common.action_error'));
     }
     if (!is_array($prid)) {
         $prid = array($prid);
     }
     $posArticle = $this->prModel->getPositionArticleInIds($prid);
     if ($this->pProcess->delRelation($prid)) {
         $this->setActionLog(['posArticle' => $posArticle]);
         return responseJson(Lang::get('common.action_success'), true);
     }
     return responseJson($this->pProcess->getErrorMessage());
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:18,代码来源:PositionController.php

示例10: editShopCategory

 /**
  * 编辑店铺分类
  *
  * @param object $data
  * @return boolean true|false
  * @access public
  */
 public function editShopCategory(CategorySave $data)
 {
     $id = intval($data->category_id);
     unset($data->category_id);
     if (!$this->productCategoryValidate->edit($data)) {
         return $this->setErrorMsg($this->productCategoryValidate->getErrorMessage());
     }
     if ($this->productCategoryModel->checkIfIsExists($data->category_name, false, $id)) {
         return $this->setErrorMsg(Lang::get('shopcategory.name_exists'));
     }
     $data = $data->toArray();
     if ($this->productCategoryModel->editShopCategory($data, $id) === false) {
         return $this->setErrorMsg(Lang::get('common.action_error'));
     }
     return true;
 }
开发者ID:pfdtk,项目名称:bmsys,代码行数:23,代码来源:ProductCategoryProcess.php

示例11: modifyPassword

 /**
  * 修改自己的密码
  * 
  * @param object $params
  * @return true|false
  */
 public function modifyPassword(\App\Services\Admin\User\Param\UserModifyPassword $params)
 {
     if (!$this->userValidate->password($params)) {
         return $this->setErrorMsg($this->userValidate->getErrorMessage());
     }
     $loginProcess = new \App\Services\Admin\Login\Process();
     $userInfo = \App\Services\Admin\SC::getLoginSession();
     if ($userInfo->password != md5($params->oldPassword)) {
         return $this->setErrorMsg(Lang::get('user.old_password_wrong'));
     }
     $updateData = ['password' => md5($params->newPassword)];
     if (app('model.admin.user')->editUser($updateData, $userInfo->id) !== false) {
         return true;
     }
     return $this->setErrorMsg(Lang::get('common.action_error'));
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:22,代码来源:Process.php

示例12: editAcl

 /**
  * 编辑权限菜单
  *
  * @param object $data
  * @return boolean true|false
  * @access public
  */
 public function editAcl(AclSave $data)
 {
     $id = intval(url_param_decode($data->id));
     unset($data->id);
     if (!$id) {
         return $this->setErrorMsg(Lang::get('common.illegal_operation'));
     }
     if (!$this->aclValidate->edit($data)) {
         return $this->setErrorMsg($this->aclValidate->getErrorMessage());
     }
     if ($this->permissionModel->checkIfIsExists($data->module, $data->class, $data->action, false, $id)) {
         return $this->setErrorMsg(Lang::get('acl.acl_exists'));
     }
     $data = $data->toArray();
     if ($this->permissionModel->editPermission($data, intval($id)) === false) {
         return $this->setErrorMsg(Lang::get('common.action_error'));
     }
     return true;
 }
开发者ID:pfdtk,项目名称:bmsys,代码行数:26,代码来源:Process.php

示例13: editAcl

 /**
  * 编辑权限菜单
  *
  * @param string $data
  * @access public
  * @return boolean true|false
  */
 public function editAcl(\App\Services\Admin\Acl\Param\AclSave $data)
 {
     $id = intval(url_param_decode($data->id));
     unset($data->id);
     if (!$id) {
         return $this->setErrorMsg(Lang::get('common.illegal_operation'));
     }
     if (!$this->aclValidate->edit($data)) {
         return $this->setErrorMsg($this->aclValidate->getErrorMessage());
     }
     if ($this->permissionModel->checkIfIsExists($data->module, $data->class, $data->action, false, $id)) {
         return $this->setErrorMsg(Lang::get('acl.acl_exists'));
     }
     $info = $this->permissionModel->getOnePermissionById(intval($data->pid));
     $data = $data->toArray();
     $data['level'] = $info['level'] + 1;
     if ($this->permissionModel->editPermission($data, intval($id)) !== false) {
         return true;
     }
     return $this->setErrorMsg(Lang::get('common.action_error'));
 }
开发者ID:jjzhai,项目名称:mylaravel,代码行数:28,代码来源:Process.php

示例14: editWorkflowStep

 /**
  * 编辑工作流步骤
  *
  * @param string $data
  * @access public
  * @return boolean true|false
  */
 public function editWorkflowStep(\App\Services\Admin\Workflow\Param\WorkflowStepSave $data)
 {
     if (!isset($data->id)) {
         return $this->setErrorMsg(Lang::get('common.action_error'));
     }
     if (!in_array($data['step_level'], array_fetch($this->workflowStepLevelList(), 'step_level'))) {
         return $this->setErrorMsg(Lang::get('common.illegal_operation'));
     }
     $id = $data->id;
     unset($data->id);
     if (!$id) {
         return $this->setErrorMsg(Lang::get('common.illegal_operation'));
     }
     if (!$this->workflowStepValidate->edit($data)) {
         return $this->setErrorMsg($this->workflowStepValidate->getErrorMessage());
     }
     if ($this->workflowStepModel->editWorkflowStep($data->toArray(), $id) !== false) {
         return true;
     }
     return $this->setErrorMsg(Lang::get('common.action_error'));
 }
开发者ID:shootsoft,项目名称:laravel5_backen,代码行数:28,代码来源:Process.php

示例15: editContent

 /**
  * 编辑文章
  *
  * @param string $data
  * @access public
  * @return boolean true|false
  */
 public function editContent(\App\Services\Admin\Content\Param\ContentSave $data, $id)
 {
     if (!$this->contentValidate->edit($data)) {
         return $this->setErrorMsg($this->contentValidate->getErrorMessage());
     }
     $object = new \stdClass();
     $object->contentAutoId = $id;
     try {
         $result = \DB::transaction(function () use($data, $id, $object) {
             $this->updateContent($data, $id);
             $this->updateContentDetail($data, $id);
             $this->saveArticleTags($object, $data['tags']);
             $this->saveArticleClassify($object, $data['classify']);
             $this->saveSeachFullText($object, $data, true);
             return true;
         });
     } catch (\Exception $e) {
         $result = false;
     }
     return !$result ? $this->setErrorMsg(Lang::get('common.action_error')) : true;
 }
开发者ID:jjzhai,项目名称:mylaravel,代码行数:28,代码来源:Process.php


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