PHP code example of netzbegruenung / green-directory

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

    

netzbegruenung / green-directory example snippets




use Netzbegruenung\GreenDirectory\Reader;
use Netzbegruenung\GreenDirectory\Repository;

$repository = new Repository(new Reader(__DIR__ . '/green-directory/data'));
$chapter = $repository->findBySherpaId('11002609');

echo $chapter->getCity();