Exemplo n.º 1
0
 public function template(&$_class)
 {
     $engine = new Handlebars(array('loader' => new \Handlebars\Loader\FilesystemLoader(__DIR__ . '/tpl/')));
     $_poxo = new Source();
     $result = $engine->render('java', $_class);
     $_poxo->setFileName($_class->getName() . ".java");
     $_poxo->setSourceCode($result);
     return array($_poxo);
 }
Exemplo n.º 2
0
 public function template(&$_class)
 {
     $engine = new Handlebars(array('loader' => new \Handlebars\Loader\FilesystemLoader(__DIR__ . '/tpl/')));
     $result = array();
     $sourceCode = $engine->render('objch', $_class);
     $_poxo = new Source();
     $_poxo->setFileName($_class->getName() . ".h");
     $_poxo->setSourceCode($sourceCode);
     array_push($result, $_poxo);
     $sourceCode = $engine->render('objcm', $_class);
     $_poxo = new Source();
     $_poxo->setFileName($_class->getName() . ".m");
     $_poxo->setSourceCode($sourceCode);
     array_push($result, $_poxo);
     return $result;
 }