PHP code example of aviator / makeable
1. Go to this page and download the library: Download aviator/makeable 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/ */
aviator / makeable example snippets
class Something
{
use MakeableTrait;
}
$instance = Something::make($arg1, $arg2);
interface SomeInterface extends Makeable, SomeOtherInterface
{
/* ... etc */
}
abstract class Seuss
{
use MakeableTrait;
}
class ThingOne extends Seuss {};
class ThingTwo extends ThingOne {};
// Get an instance of ThingOne
$instance = ThingOne::make();
// Get an instance of ThingTwo
$instance = ThingTwo::make();