PHP code example of eclipxe / generic-collections

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

    

eclipxe / generic-collections example snippets


// collection = new Collection<Foo>();
$collection = new Collection(Foo::class);

class Foos extends Collection
{
    public function __construct(array $elements)
    {
        parent::__construct(Foo::class, $elements);
    }
}