PHP code example of rewrewby / tmdb-symfony

1. Go to this page and download the library: Download rewrewby/tmdb-symfony 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/ */

    

rewrewby / tmdb-symfony example snippets


    public function registerBundles()
    {
        ...
        new Tmdb\SymfonyBundle\TmdbSymfonyBundle()
        ...
    }

    public function registerBundles()
    {
        ...
        new \Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle()
        ...
    }

$client = $this->get('tmdb.client');

$movie = $this->get('tmdb.movie_repository')->load(13);

"php-tmdb/symfony": "~2.0"
twig
{{ movie.backdropImage|tmdb_image_url }}

{{ movie.backdropImage|tmdb_image_html('original', null, 50)|raw }}