PHP code example of the-toster / hdrtr

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

    

the-toster / hdrtr example snippets




declare(strict_types=1);


use Hdrtr\Hydrator;
use Typhoon\Type\objectT;
use Typhoon\Type\stringT;
use Hdrtr\Tests\Collection;


$collection = (new Hydrator())
    ->hydrate(['items' => ['a', 'b', 'c']], objectT(Collection::class, stringT));