This commit is contained in:
2021-04-25 11:22:23 +08:00
parent 5e2c46a3aa
commit 77a6445eea
13 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ class Annotation extends Component
*/
public function injectProperty(object $class)
{
$this->_loader->injectProperty(get_class($class), $class);
$this->_loader->injectProperty($class::class, $class);
}
+1 -1
View File
@@ -405,7 +405,7 @@ class Loader extends BaseObject
$value->execute([$annotations['handler']]);
}
$_className = get_class($annotations['handler']);
$_className = $annotations['handler']::class;
foreach ($annotations['methods'] as $name => $attribute) {
foreach ($attribute as $value) {
if ($value instanceof Relation) {
+1 -1
View File
@@ -42,7 +42,7 @@ use Snowflake\Snowflake;
*/
public function execute(array $handler): mixed
{
$class = ['class' => get_class($handler[0])];
$class = ['class' => $handler[0]::class];
if (!empty($this->args)) {
$class = array_merge($class, $this->args);
}
+1 -1
View File
@@ -39,7 +39,7 @@ use Snowflake\Snowflake;
/** @var HttpFilter $filter */
$filter = Snowflake::app()->get('filter');
$filter->register(get_class($class), $method, $this->rules);
$filter->register($class::class, $method, $this->rules);
return $handler;
}