Example #1
0
 /**
  * @param string                                                $name
  * @param \Gaufrette\Filesystem                                 $filesystem
  * @param \Sonata\MediaBundle\CDN\CDNInterface                  $cdn
  * @param \Sonata\MediaBundle\Generator\GeneratorInterface      $pathGenerator
  * @param \Sonata\MediaBundle\Thumbnail\ThumbnailInterface      $thumbnail
  * @param array                                                 $allowedExtensions
  * @param array                                                 $allowedMimeTypes
  * @param \Sonata\MediaBundle\Metadata\MetadataBuilderInterface $metadata
  */
 public function __construct($name, Filesystem $filesystem, CDNInterface $cdn, GeneratorInterface $pathGenerator, ThumbnailInterface $thumbnail, array $allowedExtensions = array(), array $allowedMimeTypes = array(), MetadataBuilderInterface $metadata = null)
 {
     parent::__construct($name, $filesystem, $cdn, $pathGenerator, $thumbnail);
     $this->allowedExtensions = $allowedExtensions;
     $this->allowedMimeTypes = $allowedMimeTypes;
     $this->metadata = $metadata;
 }
 /**
  * @param string                                                $name
  * @param \Gaufrette\Filesystem                                 $filesystem
  * @param \Sonata\MediaBundle\CDN\CDNInterface                  $cdn
  * @param \Sonata\MediaBundle\Generator\GeneratorInterface      $pathGenerator
  * @param \Sonata\MediaBundle\Thumbnail\ThumbnailInterface      $thumbnail
  * @param array                                                 $allowedExtensions
  * @param array                                                 $allowedMimeTypes
  * @param \Sonata\MediaBundle\Metadata\MetadataBuilderInterface $metadata
  */
 public function __construct($name, Filesystem $filesystem, CDNInterface $cdn, GeneratorInterface $pathGenerator, ThumbnailInterface $thumbnail, array $allowedExtensions = array(), array $allowedMimeTypes = array(), MetadataBuilderInterface $metadata = null)
 {
     parent::__construct($name, $filesystem, $cdn, $pathGenerator, $thumbnail);
     $this->allowedExtensions = array(0 => 'pdf', 1 => 'txt', 2 => 'rtf', 3 => 'doc', 4 => 'docx', 5 => 'xls', 6 => 'xlsx', 7 => 'ppt', 8 => 'pttx', 9 => 'odt', 10 => 'odg', 11 => 'odp', 12 => 'ods', 13 => 'odc', 14 => 'odf', 15 => 'odb', 16 => 'csv', 17 => 'xml');
     $this->allowedMimeTypes = array(0 => 'application/pdf', 1 => 'application/x-pdf', 2 => 'application/rtf', 3 => 'text/html', 4 => 'text/rtf', 5 => 'text/plain', 6 => 'application/excel', 7 => 'application/msword', 8 => 'application/vnd.ms-excel', 9 => 'application/vnd.ms-powerpoint', 10 => 'application/vnd.ms-powerpoint', 11 => 'application/vnd.oasis.opendocument.text', 12 => 'application/vnd.oasis.opendocument.graphics', 13 => 'application/vnd.oasis.opendocument.presentation', 14 => 'application/vnd.oasis.opendocument.spreadsheet', 15 => 'application/vnd.oasis.opendocument.chart', 16 => 'application/vnd.oasis.opendocument.formula', 17 => 'application/vnd.oasis.opendocument.database', 18 => 'application/vnd.oasis.opendocument.image', 19 => 'text/comma-separated-values', 20 => 'text/xml', 21 => 'application/xml', 22 => 'application/zip');
     $this->metadata = $metadata;
 }
 /**
  * @param string             $name
  * @param Filesystem         $filesystem
  * @param CDNInterface       $cdn
  * @param GeneratorInterface $pathGenerator
  * @param ThumbnailInterface $thumbnail
  */
 public function __construct($name, Filesystem $filesystem, CDNInterface $cdn, GeneratorInterface $pathGenerator, ThumbnailInterface $thumbnail)
 {
     parent::__construct($name, $filesystem, $cdn, $pathGenerator, $thumbnail);
     $this->allowedExtensions = array('mp3', 'ogg');
     $this->allowedMimeTypes = array('audio/mpeg', 'audio/mp3', 'audio/ogg');
     $this->iconPath = '/bundles/podcast/images/mp34.png';
     $this->metadata = array();
 }
 /**
  * @param string $name
  * @param Filesystem $filesystem
  * @param CDNInterface $cdn
  * @param GeneratorInterface $pathGenerator
  * @param ThumbnailInterface $thumbnail
  * @param array $allowedExtensions
  * @param array $allowedMimeTypes
  * @param ResizerInterface $resizer
  * @param MetadataBuilderInterface|null $metadata
  * @param FFMpeg $FFMpeg
  * @param FFProbe $FFProbe
  */
 public function __construct($name, Filesystem $filesystem, CDNInterface $cdn, GeneratorInterface $pathGenerator, ThumbnailInterface $thumbnail, array $allowedExtensions = array(), array $allowedMimeTypes = array(), ResizerInterface $resizer, MetadataBuilderInterface $metadata = null, FFMpeg $FFMpeg, FFProbe $FFProbe)
 {
     parent::__construct($name, $filesystem, $cdn, $pathGenerator, $thumbnail, null, $metadata);
     $this->allowedExtensions = $allowedExtensions;
     $this->allowedMimeTypes = $allowedMimeTypes;
     $this->metadata = $metadata;
     $this->resizer = $resizer;
     $this->getId3 = new GetId3();
     $this->ffprobe = $FFProbe;
     $this->ffmpeg = $FFMpeg;
 }
 /**
  * @param string                                           $name
  * @param \Gaufrette\Filesystem                            $filesystem
  * @param \Sonata\MediaBundle\CDN\CDNInterface             $cdn
  * @param \Sonata\MediaBundle\Generator\GeneratorInterface $pathGenerator
  * @param \Sonata\MediaBundle\Thumbnail\ThumbnailInterface $thumbnail
  * @param \Buzz\Browser                                    $browser
  */
 public function __construct($name, Filesystem $filesystem, CDNInterface $cdn, GeneratorInterface $pathGenerator, ThumbnailInterface $thumbnail, Browser $browser)
 {
     parent::__construct($name, $filesystem, $cdn, $pathGenerator, $thumbnail);
     $this->browser = $browser;
 }
 /**
  * @param string                        $name
  * @param Filesystem                    $filesystem
  * @param CDNInterface                  $cdn
  * @param GeneratorInterface            $pathGenerator
  * @param ThumbnailInterface            $thumbnail
  * @param Browser                       $browser
  * @param MetadataBuilderInterface|null $metadata
  */
 public function __construct($name, Filesystem $filesystem, CDNInterface $cdn, GeneratorInterface $pathGenerator, ThumbnailInterface $thumbnail, Browser $browser, MetadataBuilderInterface $metadata = null)
 {
     parent::__construct($name, $filesystem, $cdn, $pathGenerator, $thumbnail);
     $this->browser = $browser;
     $this->metadata = $metadata;
 }