Created
July 9, 2015 19:56
-
-
Save ebylund/2aa61cc22d18532cc12d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
use Memio\Memio\Config\Build; | |
use Memio\Model\File; | |
use Memio\Model\Object; | |
use Memio\Model\Property; | |
use Memio\Model\Method; | |
use Memio\Model\Argument; | |
use Symfony\Component\Yaml\Yaml; | |
//Describe the code you want to generate using "Models" | |
$methodName = "__construct"; | |
$method = new Method($methodName); | |
for ($i = 1; $i < 14; $i++){ | |
$method->addArgument(new Argument('string', 'arg'.$i)); | |
} | |
$prettyPrinter = Build::prettyPrinter(); | |
echo "\n\n"; | |
echo $prettyPrinter->generateCode($method); | |
echo "\n\n\n\n"; | |
// ******************************************************************// | |
$superMethod = Method::make('supHomie') | |
->makePrivate() | |
; | |
echo $prettyPrinter->generateCode($superMethod); | |
echo "\n\n\n\n"; | |
// ******************************************************************// | |
$array = Yaml::parse(file_get_contents('model.yaml')); | |
echo Yaml::dump($array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment