• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/Validate/File/IsCompressed.php

00001 <?php
00025 require_once 'Zend/Validate/File/MimeType.php';
00026 
00035 class Zend_Validate_File_IsCompressed extends Zend_Validate_File_MimeType
00036 {
00040     const FALSE_TYPE   = 'fileIsCompressedFalseType';
00041     const NOT_DETECTED = 'fileIsCompressedNotDetected';
00042     const NOT_READABLE = 'fileIsCompressedNotReadable';
00043 
00047     protected $_messageTemplates = array(
00048         self::FALSE_TYPE   => "The file '%value%' is not compressed, '%type%' detected",
00049         self::NOT_DETECTED => "The mimetype of file '%value%' has not been detected",
00050         self::NOT_READABLE => "The file '%value%' can not be read"
00051     );
00052 
00059     public function __construct($mimetype = array())
00060     {
00061         if ($mimetype instanceof Zend_Config) {
00062             $mimetype = $mimetype->toArray();
00063         } else if (empty($mimetype)) {
00064             $mimetype = array(
00065                 'application/x-tar',
00066                 'application/x-cpio',
00067                 'application/x-debian-package',
00068                 'application/x-archive',
00069                 'application/x-arc',
00070                 'application/x-arj',
00071                 'application/x-lharc',
00072                 'application/x-lha',
00073                 'application/x-rar',
00074                 'application/zip',
00075                 'application/zoo',
00076                 'application/x-eet',
00077                 'application/x-java-pack200',
00078                 'application/x-compress',
00079                 'application/x-gzip',
00080                 'application/x-bzip2'
00081             );
00082         }
00083 
00084         $this->setMimeType($mimetype);
00085     }
00086 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2