module/Core/src/Grid/Core/Controller/UploadController.php
protected function getValidators( $types )
    {
        $validators = array();

        if ( 'image/*' == $types )
        {
            $validators[] = array(
                'name' => 'Zend\Validator\File\IsImage',
            );
        }
        else if ( ! empty( $types ) && '*' !== $types && '*/*' !== $types )
        {
            $validators[] = array(
                'name'      => 'Zend\Validator\File\MimeType',
                'options'   => array(
                    'mimeType' => $types
                ),
            );
        }

        return $validators;
    }
protected function getValidators( $types )
    {
        $validators = array();

        if ( 'image/*' == $types )
        {
            $validators[] = array(
                'name' => 'Zend\Validator\File\IsImage',
            );
        }
        else if ( ! empty( $types ) && '*' !== $types && '*/*' !== $types )
        {
            $validators[] = array(
                'name'      => 'Zend\Validator\File\MimeType',
                'options'   => array(
                    'mimeType' => $types
                ),
            );
        }

        return $validators;
    }
protected function getValidators ( $ types ) { $ validators = array ( ) ; if ( 'image/*' == $ types ) { $ validators [ ] = array ( 'name' => 'Zend\Validator\File\IsImage' , ) ; } else if ( ! empty ( $ types ) && '*' !== $ types && '*/*' !== $ types ) { $ validators [ ] = array ( 'name' => 'Zend\Validator\File\MimeType' , 'options' => array ( 'mimeType' => $ types ) , ) ; } return $ validators ; }
Get mime-validators for a file

@param string $types
@return array
Get mime - validators for a file