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


PHP MessageBox::writeWarning方法代码示例

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


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

示例1: _createObjectOperation

 protected function _createObjectOperation()
 {
     if (isset($_FILES[$this->name]['tmp_name']['file'])) {
         if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) {
             MessageBox::writeWarning('uploaded file size exceeds limit');
             return false;
         }
         $this->object->set('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']);
         $this->object->set('file_name', $_FILES[$this->name]['name']['file']);
         $this->object->set('mime_type', $_FILES[$this->name]['type']['file']);
     }
     return parent::_createObjectOperation();
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:CreateFileAction.class.php

示例2: _validPerform

 protected function _validPerform($request, $response)
 {
     $user_object = Limb::toolkit()->createSiteObject('UserObject');
     $data = $this->dataspace->export();
     try {
         $user_object->changeOwnPassword($data['password']);
     } catch (SQLException $e) {
         throw $e;
     } catch (LimbException $e) {
         $request->setStatus(Request::STATUS_FAILED);
     }
     $request->setStatus(Request::STATUS_FORM_SUBMITTED);
     Limb::toolkit()->getUser()->logout();
     MessageBox::writeWarning(Strings::get('need_relogin', 'user'));
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:ChangeOwnPasswordAction.class.php

示例3: _validPerform

 public function _validPerform($request, $response)
 {
     parent::_validPerform($request, $response);
     if ($this->_changingOwnPassword()) {
         Limb::toolkit()->getUser()->logout();
         MessageBox::writeWarning(Strings::get('need_relogin', 'user'));
     } else {
         $object_data = $this->_loadObjectData();
         Limb::toolkit()->getSession()->storageDestroyUser($object_data['id']);
     }
     if ($request->getStatus() == Request::STATUS_SUCCESS) {
         if ($request->hasAttribute('popup')) {
             $response->write(closePopupResponse($request, '/'));
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:16,代码来源:ChangePasswordAction.class.php


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