protected function addMediaAttributes(File $file)
    {
        $metadataCollection = $this->app['phraseanet.metadata-reader']->read($file->getMedia());

        array_walk($metadataCollection, function (Metadata $metadata) use ($file) {
            $file->addAttribute(new MetadataAttr($metadata));
        });

        return $this;
    }
protected function addMediaAttributes(File $file)
    {
        $metadataCollection = $this->app['phraseanet.metadata-reader']->read($file->getMedia());

        array_walk($metadataCollection, function (Metadata $metadata) use ($file) {
            $file->addAttribute(new MetadataAttr($metadata));
        });

        return $this;
    }
protected function addMediaAttributes ( File $ file ) { $ metadataCollection = $ this -> app [ 'phraseanet.metadata-reader' ] -> read ( $ file -> getMedia ( ) ) ; array_walk ( $ metadataCollection , function ( Metadata $ metadata ) use ( $ file ) { $ file -> addAttribute ( new MetadataAttr ( $ metadata ) ) ; } ) ; return $ this ; }
Add technical Metadata attribute to a package file by reference to add it
to Phraseanet

@param File $file The file

@return Manager
Add technical Metadata attribute to a package file by reference to add it to Phraseanet