equal
deleted
inserted
replaced
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: Hash.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 the hash of given files |
28 * Validator for the 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_Hash extends Zend_Validate_Abstract |
35 class Zend_Validate_File_Hash extends Zend_Validate_Abstract |
36 { |
36 { |
37 /** |
37 /** |
59 |
59 |
60 /** |
60 /** |
61 * Sets validator options |
61 * Sets validator options |
62 * |
62 * |
63 * @param string|array $options |
63 * @param string|array $options |
64 * @return void |
64 * @throws Zend_Validate_Exception |
65 */ |
65 */ |
66 public function __construct($options) |
66 public function __construct($options) |
67 { |
67 { |
68 if ($options instanceof Zend_Config) { |
68 if ($options instanceof Zend_Config) { |
69 $options = $options->toArray(); |
69 $options = $options->toArray(); |
107 |
107 |
108 /** |
108 /** |
109 * Adds the hash for one or multiple files |
109 * Adds the hash for one or multiple files |
110 * |
110 * |
111 * @param string|array $options |
111 * @param string|array $options |
|
112 * @throws Zend_Validate_Exception |
112 * @return Zend_Validate_File_Hash Provides a fluent interface |
113 * @return Zend_Validate_File_Hash Provides a fluent interface |
113 */ |
114 */ |
114 public function addHash($options) |
115 public function addHash($options) |
115 { |
116 { |
116 if (is_string($options)) { |
117 if (is_string($options)) { |