initial commit

This commit is contained in:
boris
2025-09-30 09:24:25 +01:00
committed by boris
parent a783a12c97
commit c7770ea03b
4695 changed files with 525784 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?= "<?php\n" ?>
namespace <?= $class_data->getNamespace(); ?>;
<?= $class_data->getUseStatements(); ?>
<?= $class_data->getClassDeclaration(); ?>
{
<?= $generator->generateRouteForControllerMethod($route_path, $route_name); ?>
public function <?= $method_name ?>(): <?php if ($with_template) { ?>Response<?php } else { ?>JsonResponse<?php } ?>
{
<?php if ($with_template) { ?>
return $this->render('<?= $template_name ?>', [
'controller_name' => '<?= $class_data->getClassName() ?>',
]);
<?php } else { ?>
return $this->json([
'message' => 'Welcome to your new controller!',
'path' => '<?= $relative_path; ?>',
]);
<?php } ?>
}
}

View File

@@ -0,0 +1,17 @@
<?= "<?php\n" ?>
namespace <?= $class_data->getNamespace(); ?>;
<?= $class_data->getUseStatements(); ?>
<?= $class_data->getClassDeclaration(); ?>
{
public function testIndex(): void
{
$client = static::createClient();
$client->request('GET', '<?= $route_path; ?>');
self::assertResponseIsSuccessful();
}
}

View File

@@ -0,0 +1,18 @@
<?= $helper->getHeadPrintCode("Hello $class_name!"); ?>
{% block body %}
<style>
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
</style>
<div class="example-wrapper">
<h1>Hello {{ controller_name }}! ✅</h1>
This friendly message is coming from:
<ul>
<li>Your controller at <code><?= $root_directory ?>/<?= $controller_path ?></code></li>
<li>Your template at <code><?= $root_directory ?>/<?= $relative_path ?></code></li>
</ul>
</div>
{% endblock %}