变更
This commit is contained in:
@@ -181,6 +181,9 @@ class Container implements ContainerInterface
|
|||||||
{
|
{
|
||||||
$targetAttributes = $reflect->getAttributes();
|
$targetAttributes = $reflect->getAttributes();
|
||||||
foreach ($targetAttributes as $attribute) {
|
foreach ($targetAttributes as $attribute) {
|
||||||
|
if (!class_exists($attribute->getName())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$attribute->newInstance()->dispatch($object);
|
$attribute->newInstance()->dispatch($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,6 +207,9 @@ class Container implements ContainerInterface
|
|||||||
$propertyAttributes = $property->getAttributes();
|
$propertyAttributes = $property->getAttributes();
|
||||||
|
|
||||||
foreach ($propertyAttributes as $attribute) {
|
foreach ($propertyAttributes as $attribute) {
|
||||||
|
if (!class_exists($attribute->getName())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$attribute->newInstance()->dispatch($class, $property->getName());
|
$attribute->newInstance()->dispatch($class, $property->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user