qqq
This commit is contained in:
+11
-1
@@ -108,7 +108,17 @@ class Container implements ContainerInterface
|
||||
if (isset($this->_singletons[$id])) {
|
||||
return;
|
||||
}
|
||||
$this->make($id);
|
||||
$object = $this->make($id);
|
||||
$methods = $this->getReflectionClass($id);
|
||||
foreach ($methods->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
|
||||
if ($method->isStatic()) {
|
||||
continue;
|
||||
}
|
||||
$attributes = $method->getAttributes();
|
||||
foreach ($attributes as $attribute) {
|
||||
$attribute->newInstance()->dispatch($object, $method->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user