PHP code example of ilya / creator

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

    

ilya / creator example snippets


use Creator\Creator;

class Foo {

    public function __construct(AnotherClass $foo, $bar = 42)
    {
       # something here
    }
  
}

# do not want to instantiate it manually? here is what you can do
$foo = Creator::make('Foo'); # => new instance of Foo