Source for file Validate.php

Documentation is available at Validate.php

  1. <?php
  2. /**
  3.  * Teeple2 - PHP5 Web Application Framework inspired by Seasar2
  4.  *
  5.  * PHP versions 5
  6.  *
  7.  * LICENSE: This source file is subject to version 3.0 of the PHP license
  8.  * that is available through the world-wide-web at the following URI:
  9.  * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
  10.  * the PHP License and are unable to obtain it through the web, please
  11.  * send a note to license@php.net so we can mail you a copy immediately.
  12.  *
  13.  * @package     teeple
  14.  * @author      Mitsutaka Sato <miztaka@gmail.com>
  15.  * @license     http://www.php.net/license/3_0.txt  PHP License 3.0
  16.  */
  17.  
  18. /**
  19.  * Validateの実行準備および実行を行うFilter
  20.  *
  21.  * @package     teeple.filter
  22.  */
  23. {
  24.     
  25.     /**
  26.      * @var Teeple_ValidatorManager 
  27.      */
  28.     private $validatorManager;
  29.     public function setComponent_Teeple_ValidatorManager($c{
  30.         $this->validatorManager $c;
  31.     }
  32.     
  33.     /**
  34.      * コンストラクタ
  35.      *
  36.      */
  37.     public function __construct({
  38.         parent::__construct();
  39.     }
  40.  
  41.     /**
  42.      * Validate処理を実行
  43.      *
  44.      **/
  45.  
  46.     public function prefilter({
  47.  
  48.         if ($this->isCompleteAction()) {
  49.             $this->log->info("CompleteActionフラグが立っているため、Validatorは実行されませんでした。");
  50.             return;
  51.         }
  52.         
  53.         // 前のフィルターでエラーが発生してなくて、項目がある場合には実行
  54.         $attributes $this->getAttributes();
  55.         if (($this->request->isFilterError()) &&
  56.             is_array($attributes&& (count($attributes0)) {
  57.             $this->validatorManager->execute($attributes);
  58.         }
  59.  
  60.         return;
  61.     }
  62.     
  63.     public function postfilter({}
  64. }
  65. ?>

Documentation generated on Mon, 26 Apr 2010 09:00:03 +0900 by phpDocumentor 1.4.3