コード例 #1
0
ファイル: Info.php プロジェクト: bolt/filesystem
 /**
  * @param string $file
  *
  * @return Exif
  */
 protected static function readExif($file)
 {
     if (static::$exifReader === null) {
         static::$exifReader = Reader::factory(Reader::TYPE_NATIVE);
     }
     try {
         $exif = static::$exifReader->read($file);
         return Exif::cast($exif);
     } catch (\RuntimeException $e) {
         return new Exif();
     }
 }
コード例 #2
0
ファイル: ExifTest.php プロジェクト: pkdevboxy/filesystem
 public function testCast()
 {
     $exif = new Exif([]);
     $this->assertInstanceOf('Bolt\\Filesystem\\Handler\\Image\\Exif', $exif->cast(new PHPExif\Exif([])));
 }