PHP code example of tenolo / open-graph-bundle

1. Go to this page and download the library: Download tenolo/open-graph-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/ */

    

tenolo / open-graph-bundle example snippets

 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Tenolo\Bundle\OpenGraphBundle\TenoloOpenGraphBundle(),
    );
}
 php


namespace Acme\DemoBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table()
 * @ORM\Entity
 */
class BlogPost
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $title;

    /**
     * @ORM\Column(type="text")
     */
    private $content;
}