改名
This commit is contained in:
@@ -185,8 +185,13 @@ class Loader extends BaseObject
|
|||||||
if (!class_exists($attribute->getName())) {
|
if (!class_exists($attribute->getName())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
$property = $attribute->newInstance();
|
||||||
|
if ($property instanceof Inject) {
|
||||||
|
$property->execute([$_array['handler'], $method->getName()]);
|
||||||
|
} else {
|
||||||
$_property[] = $attribute->newInstance();
|
$_property[] = $attribute->newInstance();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$_array['property'][$method->getName()] = $_property;
|
$_array['property'][$method->getName()] = $_property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,9 +56,6 @@ use Snowflake\Snowflake;
|
|||||||
$rpc = Snowflake::app()->getRpc();
|
$rpc = Snowflake::app()->getRpc();
|
||||||
$rpc->addProducer($this->cmd, $handler, $this->config);
|
$rpc->addProducer($this->cmd, $handler, $this->config);
|
||||||
|
|
||||||
$attributes = Snowflake::app()->getAttributes();
|
|
||||||
$attributes->injectProperty($handler[0]);
|
|
||||||
|
|
||||||
return parent::execute($handler);
|
return parent::execute($handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -149,8 +149,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
private function createAnnotation()
|
private function createAnnotation()
|
||||||
{
|
{
|
||||||
$annotation = Snowflake::app()->getAttributes();
|
$annotation = Snowflake::app()->getAttributes();
|
||||||
$annotation->injectProperty($this);
|
|
||||||
|
|
||||||
$methods = $annotation->getMethods(get_called_class());
|
$methods = $annotation->getMethods(get_called_class());
|
||||||
foreach ($methods as $method => $attributes) {
|
foreach ($methods as $method => $attributes) {
|
||||||
foreach ($attributes as $attribute) {
|
foreach ($attributes as $attribute) {
|
||||||
|
|||||||
Reference in New Issue
Block a user