PHP code example of codag / alchemyapi-bundle

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

    

codag / alchemyapi-bundle example snippets



// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Codag\AlchemyApiBundle\CodagAlchemyApiBundle(),
    );
}


$alchemy = $this->get('codag.alchemyapi');

//TODO

//TODO

$alchemy = $this->alchemy;
$entityExtraction = $alchemy
    ->getEntityExtraction()
    ->getWeb();
$entityExtraction->setUrl($this->url);
$entityExtraction->setOutputMode('json');
$data = $entityExtraction->getData();
bash
php composer.phar update codag/alchemyapi-bundle