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
+4 -4
View File
@@ -10,7 +10,7 @@ declare(strict_types=1);
namespace Kiri\Abstracts;
use Annotation\Annotation as SAnnotation;
use Note\Note as SNote;
use Database\Connection;
use Exception;
use Http\Handler\Router;
@@ -392,10 +392,10 @@ abstract class BaseApplication extends Component
/**
* @return SAnnotation
* @return SNote
* @throws
*/
public function getAnnotation(): SAnnotation
public function getNote(): SNote
{
return $this->get('annotation');
}
@@ -450,7 +450,7 @@ abstract class BaseApplication extends Component
'error' => ['class' => ErrorHandler::class],
'config' => ['class' => Config::class],
'logger' => ['class' => Logger::class],
'annotation' => ['class' => SAnnotation::class],
'annotation' => ['class' => SNote::class],
'databases' => ['class' => Connection::class],
'jwt' => ['class' => Jwt::class],
'async' => ['class' => Async::class],
+1 -1
View File
@@ -2,7 +2,7 @@
namespace Kiri\Abstracts;
use Annotation\Inject;
use Note\Inject;
use Exception;
use Kiri\Events\EventProvider;
use Kiri\Exception\ConfigException;
+2 -2
View File
@@ -4,7 +4,7 @@
namespace Kiri\Abstracts;
use Annotation\Annotation as SAnnotation;
use Note\Note as SNote;
use Database\Connection;
use Database\DatabasesProviders;
use Http\Handler\Client\Client;
@@ -25,7 +25,7 @@ use Kiri\Jwt\JWTAuth;
* @property Async $async
* @property Logger $logger
* @property JWTAuth $jwt
* @property SAnnotation $annotation
* @property SNote $annotation
* @property BaseGoto $goto
* @property Client $client
* @property Connection $databases
+1 -1
View File
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace Kiri\Cache;
use Annotation\Inject;
use Note\Inject;
use Exception;
use Server\Events\OnWorkerExit;
use Kiri\Abstracts\Component;
+1 -1
View File
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace Kiri\Di;
use Annotation\Inject;
use Note\Inject;
use Closure;
use Exception;
use Kiri\Abstracts\BaseObject;
+1 -1
View File
@@ -236,7 +236,7 @@ class NoteManager
* @param string $method
* @return mixed
*/
public static function getPropertyByAnnotation(string $attribute, string $class, string $method): mixed
public static function getPropertyByNote(string $attribute, string $class, string $method): mixed
{
$class = self::getAttributeTrees($attribute, $class);
if (empty($class) || !isset($class['property'])) {
+1 -1
View File
@@ -9,7 +9,7 @@ declare(strict_types=1);
namespace Kiri\Error;
use Annotation\Inject;
use Note\Inject;
use Exception;
use Kiri\Abstracts\Component;
use Kiri\Core\Json;
+1 -1
View File
@@ -2,7 +2,7 @@
namespace Kiri\FileListen;
use Annotation\Inject;
use Note\Inject;
use Exception;
use Kiri\Abstracts\Config;
use Kiri\Error\Logger;
+4 -4
View File
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace Kiri;
use Annotation\Annotation;
use Note\Note;
use Database\Collection;
use Database\ModelInterface;
use Exception;
@@ -156,12 +156,12 @@ class Kiri
/**
* @return Annotation
* @return Note
* @throws Exception
*/
public static function getAnnotation(): Annotation
public static function getNote(): Note
{
return static::app()->getAnnotation();
return static::app()->getNote();
}
+1 -1
View File
@@ -43,7 +43,7 @@ class Runtime extends Command
public function execute(InputInterface $input, OutputInterface $output): int
{
// TODO: Implement onHandler() method.
$annotation = Kiri::app()->getAnnotation();
$annotation = Kiri::app()->getNote();
$runtime = storage(static::CACHE_NAME);
$config = storage(static::CONFIG_NAME);