web/lib/Zend/Validate/File/Count.php
changeset 1230 68c69c656a2c
parent 807 877f952ae2bd
equal deleted inserted replaced
1229:5a6b6e770365 1230:68c69c656a2c
    12  * obtain it through the world-wide-web, please send an email
    12  * obtain it through the world-wide-web, please send an email
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category  Zend
    15  * @category  Zend
    16  * @package   Zend_Validate
    16  * @package   Zend_Validate
    17  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    17  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    18  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    19  * @version   $Id: Count.php 24593 2012-01-05 20:35:02Z matthew $
    19  * @version   $Id$
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * @see Zend_Validate_Abstract
    23  * @see Zend_Validate_Abstract
    24  */
    24  */
    27 /**
    27 /**
    28  * Validator for counting all given files
    28  * Validator for counting all given files
    29  *
    29  *
    30  * @category  Zend
    30  * @category  Zend
    31  * @package   Zend_Validate
    31  * @package   Zend_Validate
    32  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    32  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    33  * @license   http://framework.zend.com/license/new-bsd     New BSD License
    34  */
    34  */
    35 class Zend_Validate_File_Count extends Zend_Validate_Abstract
    35 class Zend_Validate_File_Count extends Zend_Validate_Abstract
    36 {
    36 {
    37     /**#@+
    37     /**#@+
    99      * As Array is accepts the following keys:
    99      * As Array is accepts the following keys:
   100      * 'min': Minimum filecount
   100      * 'min': Minimum filecount
   101      * 'max': Maximum filecount
   101      * 'max': Maximum filecount
   102      *
   102      *
   103      * @param  integer|array|Zend_Config $options Options for the adapter
   103      * @param  integer|array|Zend_Config $options Options for the adapter
   104      * @return void
   104      * @throws Zend_Validate_Exception
   105      */
   105      */
   106     public function __construct($options)
   106     public function __construct($options)
   107     {
   107     {
   108         if ($options instanceof Zend_Config) {
   108         if ($options instanceof Zend_Config) {
   109             $options = $options->toArray();
   109             $options = $options->toArray();
   208 
   208 
   209     /**
   209     /**
   210      * Adds a file for validation
   210      * Adds a file for validation
   211      *
   211      *
   212      * @param string|array $file
   212      * @param string|array $file
       
   213      * @return $this
   213      */
   214      */
   214     public function addFile($file)
   215     public function addFile($file)
   215     {
   216     {
   216         if (is_string($file)) {
   217         if (is_string($file)) {
   217             $file = array($file);
   218             $file = array($file);