public function addMimeType($mimetype)
    {
        $mimetypes = $this->getMimeType(true);

        if (is_string($mimetype)) {
            $mimetype = explode(',', $mimetype);
        } elseif (!is_array($mimetype)) {

            throw new Zend_Validate_Exception("Invalid options to validator provided");
        }

        if (isset($mimetype['magicfile'])) {
            unset($mimetype['magicfile']);
        }

        foreach ($mimetype as $content) {
            if (empty($content) || !is_string($content)) {
                continue;
            }
            $mimetypes[] = trim($content);
        }
        $mimetypes = array_unique($mimetypes);

        // Sanity check to ensure no empty values
        foreach ($mimetypes as $key => $mt) {
            if (empty($mt)) {
                unset($mimetypes[$key]);
            }
        }

        $this->_mimetype = implode(',', $mimetypes);

        return $this;
    }
public function addMimeType($mimetype)
    {
        $mimetypes = $this->getMimeType(true);

        if (is_string($mimetype)) {
            $mimetype = explode(',', $mimetype);
        } elseif (!is_array($mimetype)) {

            throw new Zend_Validate_Exception("Invalid options to validator provided");
        }

        if (isset($mimetype['magicfile'])) {
            unset($mimetype['magicfile']);
        }

        foreach ($mimetype as $content) {
            if (empty($content) || !is_string($content)) {
                continue;
            }
            $mimetypes[] = trim($content);
        }
        $mimetypes = array_unique($mimetypes);

        // Sanity check to ensure no empty values
        foreach ($mimetypes as $key => $mt) {
            if (empty($mt)) {
                unset($mimetypes[$key]);
            }
        }

        $this->_mimetype = implode(',', $mimetypes);

        return $this;
    }
public function addMimeType ( $ mimetype ) { $ mimetypes = $ this -> getMimeType ( true ) ; if ( is_string ( $ mimetype ) ) { $ mimetype = explode ( ',' , $ mimetype ) ; } elseif ( ! is_array ( $ mimetype ) ) { throw new Zend_Validate_Exception ( "Invalid options to validator provided" ) ; } if ( isset ( $ mimetype [ 'magicfile' ] ) ) { unset ( $ mimetype [ 'magicfile' ] ) ; } foreach ( $ mimetype as $ content ) { if ( empty ( $ content ) || ! is_string ( $ content ) ) { continue ; } $ mimetypes [ ] = trim ( $ content ) ; } $ mimetypes = array_unique ( $ mimetypes ) ; // Sanity check to ensure no empty values foreach ( $ mimetypes as $ key => $ mt ) { if ( empty ( $ mt ) ) { unset ( $ mimetypes [ $ key ] ) ; } } $ this -> _mimetype = implode ( ',' , $ mimetypes ) ; return $ this ; }
Adds the mimetypes

@param  string|array $mimetype The mimetypes to add for validation
@return Zend_Validate_File_Extension Provides a fluent interface
Adds the mimetypes