Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4fa5c23c10 | |||
| f46af653f2 |
+2
-2
@@ -8,7 +8,7 @@ use JetBrains\PhpStorm\Pure;
|
||||
use Kiri\Abstracts\Config;
|
||||
use Kiri\Application;
|
||||
use Kiri\Core\ArrayAccess;
|
||||
use Kiri\Di\AnnotationManager;
|
||||
use Kiri\Di\NoteManager;
|
||||
use Kiri\Error\Logger;
|
||||
use Kiri\Events\EventDispatch;
|
||||
use Kiri\Events\EventProvider;
|
||||
@@ -261,7 +261,7 @@ if (!function_exists('injectRuntime')) {
|
||||
|
||||
$router = [];
|
||||
foreach ($fileLists as $class) {
|
||||
foreach (AnnotationManager::getTargetAnnotation($class) as $value) {
|
||||
foreach (NoteManager::getTargetAnnotation($class) as $value) {
|
||||
if (!method_exists($value, 'execute')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ class Container implements ContainerInterface
|
||||
*/
|
||||
public function propertyInject(ReflectionClass $reflect, $object): mixed
|
||||
{
|
||||
foreach (AnnotationManager::getPropertyAnnotation($reflect) as $property => $inject) {
|
||||
foreach (NoteManager::getPropertyAnnotation($reflect) as $property => $inject) {
|
||||
/** @var Inject $inject */
|
||||
$inject->execute($object, $property);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ class Container implements ContainerInterface
|
||||
*/
|
||||
public function getMethodAttribute($className, $method = null): array
|
||||
{
|
||||
$methods = AnnotationManager::getMethodAnnotation($this->getReflect($className));
|
||||
$methods = NoteManager::getMethodAnnotation($this->getReflect($className));
|
||||
if (!empty($method)) {
|
||||
return $methods[$method] ?? [];
|
||||
}
|
||||
@@ -227,7 +227,7 @@ class Container implements ContainerInterface
|
||||
*/
|
||||
public function getClassReflectionProperty(string $class, string $property = null): ReflectionProperty|null|array
|
||||
{
|
||||
$lists = AnnotationManager::getProperty($this->getReflect($class));
|
||||
$lists = NoteManager::getProperty($this->getReflect($class));
|
||||
if (empty($lists)) {
|
||||
return null;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ class Container implements ContainerInterface
|
||||
if ($reflect->isAbstract() || $reflect->isTrait() || $reflect->isInterface()) {
|
||||
return $this->_reflection[$class] = $reflect;
|
||||
}
|
||||
$construct = AnnotationManager::resolveTarget($reflect);
|
||||
$construct = NoteManager::resolveTarget($reflect);
|
||||
if (!empty($construct) && $construct->getNumberOfParameters() > 0) {
|
||||
$this->_constructs[$class] = $construct;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ class Container implements ContainerInterface
|
||||
if (is_string($class)) {
|
||||
$class = $this->getReflect($class);
|
||||
}
|
||||
return AnnotationManager::getMethods($class);
|
||||
return NoteManager::getMethods($class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ use ReflectionAttribute;
|
||||
use ReflectionClass;
|
||||
use ReflectionProperty;
|
||||
|
||||
class AnnotationManager
|
||||
class NoteManager
|
||||
{
|
||||
|
||||
|
||||
@@ -171,9 +171,9 @@ class AnnotationManager
|
||||
*/
|
||||
public static function resolveTarget(ReflectionClass $reflect): ?\ReflectionMethod
|
||||
{
|
||||
AnnotationManager::setPropertyAnnotation($reflect);
|
||||
AnnotationManager::setTargetAnnotation($reflect);
|
||||
AnnotationManager::setMethodAnnotation($reflect);
|
||||
NoteManager::setPropertyAnnotation($reflect);
|
||||
NoteManager::setTargetAnnotation($reflect);
|
||||
NoteManager::setMethodAnnotation($reflect);
|
||||
|
||||
return $reflect->getConstructor();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ class Server extends AbstractServer
|
||||
return;
|
||||
}
|
||||
if ($this->callback instanceof OnCloseInterface) {
|
||||
$this->callback->onClose($server, $fd);
|
||||
$this->callback->onClose($fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user