PHP code example of aureka / disqus-bundle

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

    

aureka / disqus-bundle example snippets


public function registerBundles()
{
    $bundles = array(
        // your other bundles
        new Aureka\DisqusBundle\AurekaDisqusBundle(),
    );
}

# src/Acme/DemoBundle/Entity/BlogPost.php

namespace Acme\DemoBundle\Entity;

use Aureka\DisqusBundle\Model\Disqusable;

class BlogPost implements Disqusable
{

    // ... your other methods

    public function getDisqusId()
    {
        return $this->disqusId; // generate it on the fly or make it persisted.
    }
}

# src/Acme/DemoBundle/Entity/User.php

namespace Acme\DemoBundle\Entity;

use Areka\DisqusBundle\Model\DisqusUser;

class User implements DisqusUser
{
    public function getDisqusId()
    {
        return $this->id; // Or a custom generated id
    }
}