Esempio n. 1
0
 /**
  * Adds the crc32 hash for one or multiple files
  *
  * @param  string|array $options
  * @return \Zend\Validator\File\Hash Provides a fluent interface
  */
 public function addHash($options)
 {
     if (!is_array($options)) {
         $options = array($options);
     }
     $options['algorithm'] = 'crc32';
     parent::addHash($options);
     return $this;
 }
Esempio n. 2
0
    /**
     * Adds the sha1 hash for one or multiple files
     *
     * @param  string|array $options
     * @return \Zend\Validator\File\Hash Provides a fluent interface
     */
    public function addHash($options)
    {
        if (!is_array($options)) {
            $options = (array) $options;
        }

        $options['algorithm'] = 'sha1';
        parent::addHash($options);
        return $this;
    }