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


PHP AdminAction::validate方法代码示例

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


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

示例1: validate

 /**
  * Check that the parameter is correct.
  */
 function validate()
 {
     // let's make sure that the "page" parameter has a sane value
     // and that it is not below 0
     $val = new IntegerValidator();
     $this->_page = $this->_request->getValue("page");
     if (!$val->validate($this->_page) || $this->_page < 0) {
         $this->_page = 1;
     }
     // run the real validation stuff...
     return parent::validate();
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:15,代码来源:adminpoststatsaction.class.php

示例2: validate

 function validate()
 {
     if (!parent::validate()) {
         $resources = new GalleryResources();
         $resource = $resources->getResource($this->_request->getValue("resourceId"), $this->_blogInfo->getId());
         if (!$resource) {
             $this->setValidationErrorView(new AdminResourcesListView($this->_blogInfo));
             $this->setCommonData();
             return false;
         }
         $this->_view->setValue("resource", $resource);
         return false;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:15,代码来源:adminupdateresourceaction.class.php

示例3: validate

 /**
  * Validates that the information we've just received from the blog settings
  * form is valid... We have to be really sure about this one!!!
  */
 function validate()
 {
     // if all correct, we can proceed
     $this->_userPassword = trim($this->_request->getValue("userSettingsPassword"));
     $this->_userConfirmPassword = trim($this->_request->getValue("confirmPassword"));
     $valid = parent::validate();
     // check that the password is correct and confirm it
     if ($this->_userPassword != "") {
         $passwordVal = new PasswordValidator();
         if (!$passwordVal->validate($this->_userPassword)) {
             $this->_form->setFieldValidationStatus("userSettingsPassword", false);
             $this->setCommonData(true);
             return false;
         }
         if ($this->_userPassword != $this->_userConfirmPassword) {
             $this->_form->setFieldValidationStatus("confirmPassword", false);
             $this->setCommonData(true);
             return false;
         }
     }
     return $valid;
 }
开发者ID:BackupTheBerlios,项目名称:plogfr-svn,代码行数:26,代码来源:adminupdateusersettingsaction.class.php


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