web/lib/Zend/Validate/File/Md5.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: Md5.php 24593 2012-01-05 20:35:02Z matthew $
    19  * @version   $Id$
    20  */
    20  */
    21 
    21 
    22 /**
    22 /**
    23  * @see Zend_Validate_File_Hash
    23  * @see Zend_Validate_File_Hash
    24  */
    24  */
    27 /**
    27 /**
    28  * Validator for the md5 hash of given files
    28  * Validator for the md5 hash of 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_Md5 extends Zend_Validate_File_Hash
    35 class Zend_Validate_File_Md5 extends Zend_Validate_File_Hash
    36 {
    36 {
    37     /**
    37     /**
    61      * Sets validator options
    61      * Sets validator options
    62      *
    62      *
    63      * $hash is the hash we accept for the file $file
    63      * $hash is the hash we accept for the file $file
    64      *
    64      *
    65      * @param  string|array $options
    65      * @param  string|array $options
    66      * @return void
    66      * @throws Zend_Validate_Exception
       
    67      * @return Zend_Validate_File_Md5
    67      */
    68      */
    68     public function __construct($options)
    69     public function __construct($options)
    69     {
    70     {
    70         if ($options instanceof Zend_Config) {
    71         if ($options instanceof Zend_Config) {
    71             $options = $options->toArray();
    72             $options = $options->toArray();
    91 
    92 
    92     /**
    93     /**
    93      * Sets the md5 hash for one or multiple files
    94      * Sets the md5 hash for one or multiple files
    94      *
    95      *
    95      * @param  string|array $options
    96      * @param  string|array $options
    96      * @param  string       $algorithm (Deprecated) Algorithm to use, fixed to md5
       
    97      * @return Zend_Validate_File_Hash Provides a fluent interface
    97      * @return Zend_Validate_File_Hash Provides a fluent interface
    98      */
    98      */
    99     public function setHash($options)
    99     public function setHash($options)
   100     {
   100     {
   101         if (!is_array($options)) {
   101         if (!is_array($options)) {
   121 
   121 
   122     /**
   122     /**
   123      * Adds the md5 hash for one or multiple files
   123      * Adds the md5 hash for one or multiple files
   124      *
   124      *
   125      * @param  string|array $options
   125      * @param  string|array $options
   126      * @param  string       $algorithm (Deprecated) Algorithm to use, fixed to md5
       
   127      * @return Zend_Validate_File_Hash Provides a fluent interface
   126      * @return Zend_Validate_File_Hash Provides a fluent interface
   128      */
   127      */
   129     public function addHash($options)
   128     public function addHash($options)
   130     {
   129     {
   131         if (!is_array($options)) {
   130         if (!is_array($options)) {