Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
bezin committed May 27, 2021
0 parents commit 3d2764e
Show file tree
Hide file tree
Showing 24 changed files with 3,292 additions and 0 deletions.
19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "presprog/kirby-attribute-routing",
"type": "kirby-plugin",
"authors": [
{
"name": "Benedict Massolle",
"email": "[email protected]"
}
],
"autoload": {
"PresProg\\AttributeRouting\\": "src/"
},
"require": {
"getkirby/composer-installer": "^1.2"
},
"extra": {
"installer-name": "attribute-routing"
}
}
66 changes: 66 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php declare(strict_types=1);

use PresProg\AttributeRouting\AttributeRouting;

require __DIR__ . '/vendor/autoload.php';

\Kirby\Cms\App::plugin('presprog/attribute-routing', [
'hooks' => [
'system.loadPlugins:after' => function () {
AttributeRouting::loadRoutes();
}
]
]);
11 changes: 11 additions & 0 deletions src/AttributeRouting.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php declare(strict_types=1);

namespace PresProg\AttributeRouting;

class AttributeRouting
{
public static function loadRoutes()
{

}
}
13 changes: 13 additions & 0 deletions src/Attributes/Get.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php declare(strict_types=1);

namespace PresProg\AttributeRouting\Attributes;

use Attribute;

#[Attribute(Attribute::TARGET_FUNCTION)]
class Get implements RouteAttribute
{
public function __construct(
public string $pattern
) {}
}
8 changes: 8 additions & 0 deletions src/Attributes/RouteAttribute.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types=1);

namespace PresProg\AttributeRouting\Attributes;

interface RouteAttribute
{

}
7 changes: 7 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit26198e21236039aeb86b9934b80cf4dd::getLoader();
Loading

0 comments on commit 3d2764e

Please sign in to comment.