コード例 #1
0
 /**
  * Check is format supported.
  *
  * @param string $image
  * @param Varien_Image_Adapter_Abstract $adapter
  * @return bool
  */
 protected function _isFormatSupported($image, $adapter)
 {
     $data = pathinfo($image);
     $supportedTypes = $adapter->getSupportedFormats();
     return $image && file_exists($image) && in_array(strtolower($data['extension']), $supportedTypes);
 }