PHP code example of routmoute / routmoute-sirene-bundle
1. Go to this page and download the library: Download routmoute/routmoute-sirene-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/ */
routmoute / routmoute-sirene-bundle example snippets
namespace App\Controller;
use Routmoute\Bundle\RoutmouteSireneBundle\Service\RoutmouteSireneApiService;
class MyController extends AbstractController
{
public function index(RoutmouteSireneApiService $sireneAPI)
{
// search company by siret
$companyInfos = $sireneAPI->siret("<siret>");
// search company by siren
$companyInfos = $sireneAPI->siren("<siren>");
/*
search company by etablissement infos
Array of search (page (default 20)
*/
$companyInfos = $sireneAPI->searchEtablissement([
"city" => "PARIS"
], "siren", 1, 10);
}
}