Compare commits

..

No commits in common. "master" and "attributes" have entirely different histories.

3 changed files with 6 additions and 6 deletions

View File

@ -6,7 +6,7 @@
"authors": [
{
"name": "Dave Mc Nicoll",
"email": "info@mcnd.ca"
"email": "mcndave@gmail.com"
}
],
"require": {

View File

@ -3,7 +3,7 @@
namespace Notes\Route\Attribute\Object;
#[\Attribute(\Attribute::TARGET_CLASS)]
class Route implements \Notes\Attribute {
class Route implements \Notes\Annotation {
public function __construct(
public string|array $method = [ "GET", "POST" ],
public string $base = "",

View File

@ -39,8 +39,8 @@ class RouteFetcher {
}
else {
$this->annotations = [
'object' => [ Attribute\Object\Route::class ],
'method' => [ Attribute\Method\Route::class ],
'object' => [ Annotation\Object\Route::class, Attribute\Object\Route::class ],
'method' => [ Annotation\Method\Route::class ],
];
}
}
@ -111,8 +111,8 @@ class RouteFetcher {
}
if ( isset($annotations['method']) ) {
$routeList = $objectResolver->getAttributeListFromClassname( $annotations['method'], false );
$routeList = $objectResolver->getAnnotationListFromClassname( $annotations['method'], false );
;
foreach($routeList as $func => $routes) {
if (is_array($routes)) {
foreach ($routes as $route) {