modify
This commit is contained in:
@@ -121,6 +121,7 @@ class Annotation extends Component
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$reflect = $this->reflectClass($class);
|
$reflect = $this->reflectClass($class);
|
||||||
|
var_dump($reflect, $class);
|
||||||
if (empty($reflect) || !$reflect->isInstantiable()) {
|
if (empty($reflect) || !$reflect->isInstantiable()) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -218,20 +219,19 @@ class Annotation extends Component
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$names = [];
|
|
||||||
foreach ($attributes as $attribute) {
|
foreach ($attributes as $attribute) {
|
||||||
/** @var IAnnotation $class */
|
/** @var IAnnotation $class */
|
||||||
$class = $this->instance($attribute);
|
$class = $this->instance($attribute);
|
||||||
if ($class === null) {
|
if ($class === null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$names[$attribute->getName()] = $class->execute([$object, $method->getName()]);
|
$class->execute([$object, $method->getName()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp['handler'] = [$object, $method->getName()];
|
// $tmp['handler'] = [$object, $method->getName()];
|
||||||
$tmp['attributes'] = $names;
|
// $tmp['attributes'] = $names;
|
||||||
|
//
|
||||||
$this->_annotations[$alias][] = $tmp;
|
// $this->_annotations[$alias][] = $tmp;
|
||||||
|
|
||||||
return $tmp;
|
return $tmp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user