This commit is contained in:
2021-11-30 15:10:01 +08:00
parent e5b57cbcdb
commit b826e1f594
36 changed files with 155 additions and 81 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
namespace Annotation;
namespace Note;
use Exception;
@@ -10,7 +10,7 @@ defined('ASPECT_ERROR') or define('ASPECT_ERROR', 'Aspect annotation must implem
/**
* Class Aspect
* @package Annotation
* @package Note
*/
#[\Attribute(\Attribute::TARGET_METHOD)] class Aspect extends Attribute
{
+3 -3
View File
@@ -1,14 +1,14 @@
<?php
namespace Annotation;
namespace Note;
/**
* Class Attribute
* @package Annotation
* @package Note
*/
abstract class Attribute implements IAnnotation
abstract class Attribute implements INote
{
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
namespace Annotation;
namespace Note;
use Exception;
@@ -11,7 +11,7 @@ use Kiri\Kiri;
/**
* Class Event
* @package Annotation
* @package Note
*/
#[\Attribute(\Attribute::TARGET_METHOD)] class Event extends Attribute
{
@@ -1,11 +1,11 @@
<?php
namespace Annotation;
namespace Note;
interface IAnnotation
interface INote
{
/**
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
namespace Annotation;
namespace Note;
use Exception;
@@ -12,7 +12,7 @@ use ReflectionProperty;
/**
* Class Inject
* @package Annotation
* @package Note
*/
#[\Attribute(\Attribute::TARGET_PROPERTY)] class Inject extends Attribute
{
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
namespace Annotation;
namespace Note;
use DirectoryIterator;
@@ -15,7 +15,7 @@ use Throwable;
/**
* Class Loader
* @package Annotation
* @package Note
*/
class Loader extends BaseObject
{
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
namespace Annotation;
namespace Note;
use Kiri\Kiri;
@@ -1,7 +1,7 @@
<?php
namespace Annotation;
namespace Note;
use DirectoryIterator;
@@ -10,10 +10,10 @@ use ReflectionException;
use Kiri\Abstracts\Component;
/**
* Class Annotation
* @package Annotation
* Class Note
* @package Note
*/
class Annotation extends Component
class Note extends Component
{
+3 -3
View File
@@ -1,14 +1,14 @@
<?php
namespace Annotation\Route;
namespace Note\Route;
use Annotation\Attribute;
use Note\Attribute;
/**
* Class Document
* @package Annotation\Route
* @package Note\Route
*/
#[\Attribute(\Attribute::TARGET_METHOD)] class Document extends Attribute
{
+3 -3
View File
@@ -1,16 +1,16 @@
<?php
namespace Annotation\Route;
namespace Note\Route;
use Annotation\Attribute;
use Note\Attribute;
use Http\Handler\Abstracts\MiddlewareManager;
use Psr\Http\Server\MiddlewareInterface;
/**
* Class Middleware
* @package Annotation\Route
* @package Note\Route
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class Middleware extends Attribute
{
+2 -2
View File
@@ -1,10 +1,10 @@
<?php
namespace Annotation\Route;
namespace Note\Route;
use Annotation\Attribute;
use Note\Attribute;
use Http\Handler\Router;
use Kiri\Kiri;
+3 -3
View File
@@ -1,14 +1,14 @@
<?php
namespace Annotation\Route;
namespace Note\Route;
use Annotation\Attribute;
use Note\Attribute;
/**
* Class Socket
* @package Annotation
* @package Note
*/
#[\Attribute(\Attribute::TARGET_METHOD)] class Socket extends Attribute
{
+2 -2
View File
@@ -1,12 +1,12 @@
<?php
namespace Annotation;
namespace Note;
/**
* Class Target
* @package Annotation
* @package Note
*/
#[\Attribute(\Attribute::TARGET_CLASS)] class Target extends Attribute
{
+2 -2
View File
@@ -1,7 +1,7 @@
<?php
namespace Annotation;
namespace Note;
use Exception;
@@ -11,7 +11,7 @@ use Server\Tasker\AsyncTaskExecute;
/**
* Class Task
* @package Annotation
* @package Note
* Task任务
*/
#[\Attribute(\Attribute::TARGET_CLASS)] class Task extends Attribute