PHP code example of boxuk / describr-bundle

1. Go to this page and download the library: Download boxuk/describr-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

boxuk / describr-bundle example snippets

 php


// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(

        // ...

        new \BoxUK\Bundle\DescribrBundle\BoxUKDescribrBundle()
    );

    // ...
}
 php


public function analyzeMetadata(File $file)
{
    $service = $this->getContainer()->get('boxuk_describr.analyzer');
    
    $metadata = $service->analyze($file);
    
    // Instance of BoxUK\Describr\MediaFileAttributes
    return $metadata;
}