Example #1
0
 public static function createFromFile($file)
 {
     if (!file_exists($file)) {
         throw new \Exception('File not found.');
     }
     $stream = new self();
     $stream->open($file);
     $stream->alpha();
     return $stream;
 }