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


PHP sfValidatorBase::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor.
  *
  * The first argument can be:
  *
  *  * null
  *  * an array of named sfValidatorBase instances
  *
  * @param mixed $fields    Initial fields
  * @param array $options   An array of options
  * @param array $messages  An array of error messages
  *
  * @see sfValidatorBase
  */
 public function __construct($fields = null, $options = array(), $messages = array())
 {
     if (is_array($fields)) {
         foreach ($fields as $name => $validator) {
             $this[$name] = $validator;
         }
     } else {
         if (null !== $fields) {
             throw new InvalidArgumentException('sfValidatorSchema constructor takes an array of sfValidatorBase objects.');
         }
     }
     parent::__construct($options, $messages);
 }
开发者ID:Phennim,项目名称:symfony1,代码行数:27,代码来源:sfValidatorSchema.class.php

示例2: __construct

 /**
  * Constructor.
  *
  * The first argument can be:
  *
  *  * null
  *  * a sfValidatorBase instance
  *  * an array of sfValidatorBase instances
  *
  * @param mixed $validators  Initial validators
  * @param array $options     An array of options
  * @param array $messages    An array of error messages
  *
  * @see sfValidatorBase
  */
 public function __construct($validators = null, $options = array(), $messages = array())
 {
     if ($validators instanceof sfValidatorBase) {
         $this->addValidator($validators);
     } else {
         if (is_array($validators)) {
             foreach ($validators as $validator) {
                 $this->addValidator($validator);
             }
         } else {
             if (null !== $validators) {
                 throw new InvalidArgumentException('sfValidatorOr constructor takes a sfValidatorBase object, or a sfValidatorBase array.');
             }
         }
     }
     parent::__construct($options, $messages);
 }
开发者ID:cuongnv540,项目名称:jobeet,代码行数:32,代码来源:sfValidatorOr.class.php

示例3: __construct

 /**
  * Constructor.
  *
  * The first argument can be:
  *
  *  * null
  *  * a sfValidatorBase instance
  *  * an array of sfValidatorBase instances
  *
  * @param mixed $validators Initial validators
  * @param array $options    An array of options
  * @param array $messages   An array of error messages
  *
  * @see sfValidatorBase
  */
 public function __construct($validators = null, $options = array(), $messages = array())
 {
     if ($validators instanceof sfValidatorBase) {
         $this->addValidator($validators);
     } else {
         if (is_array($validators)) {
             foreach ($validators as $validator) {
                 $this->addValidator($validator);
             }
         } else {
             if (!is_null($validators)) {
                 throw new InvalidArgumentException('sfValidatorAnd constructor takes a sfValidatorBase object, or a sfValidatorBase array.');
             }
         }
     }
     if (!isset($options['required'])) {
         $options['required'] = false;
     }
     parent::__construct($options, $messages);
 }
开发者ID:WIZARDISHUNGRY,项目名称:symfony,代码行数:35,代码来源:sfValidatorAnd.class.php

示例4: __construct

 public function __construct($options = array(), $messages = array())
 {
     $this->addRequiredOption(self::OPTION_WIDGET);
     parent::__construct($options, $messages);
 }
开发者ID:uniteddiversity,项目名称:policat,代码行数:5,代码来源:ValidatorWidget2Owner.class.php

示例5: __construct

 public function __construct($options = array(), $messages = array())
 {
     $this->addOption('value', null);
     parent::__construct($options, $messages);
 }
开发者ID:solutema,项目名称:siwapp-sf1,代码行数:5,代码来源:CompareValueValidator.class.php

示例6: __construct

 public function __construct(\Doctrine\ORM\EntityManager $em, $options = array(), $messages = array())
 {
     $this->em = $em;
     parent::__construct($options, $messages);
 }
开发者ID:blt04,项目名称:sfDoctrine2Plugin,代码行数:5,代码来源:sfValidatorDoctrineChoice.class.php

示例7: __construct

 public function __construct($options = array(), $messages = array())
 {
     parent::__construct($options, $messages);
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:4,代码来源:sfReservationOverlapValidator.class.php

示例8: __construct

 public function __construct($options = array(), $messages = array())
 {
     $this->addRequiredOption(self::OPTION_MODEL);
     parent::__construct($options, $messages);
     $this->addMessage('used', "Sorry ID already used");
 }
开发者ID:uniteddiversity,项目名称:policat,代码行数:6,代码来源:ValidatorFreeId.class.php

示例9: __construct

 public function __construct($options = array(), $messages = array())
 {
     parent::__construct($options, $messages);
     $this->_apiConection = new eSitefApi();
 }
开发者ID:seven07ve,项目名称:vendorepuestos,代码行数:5,代码来源:sfValidatorPagoESite.php


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