改名
This commit is contained in:
@@ -39,15 +39,15 @@ use Snowflake\Snowflake;
|
|||||||
{
|
{
|
||||||
$injectValue = $this->parseInjectValue();
|
$injectValue = $this->parseInjectValue();
|
||||||
|
|
||||||
/** @var ReflectionProperty $property */
|
/** @var ReflectionProperty $handler[1] */
|
||||||
if ($property->isPrivate() || $property->isProtected()) {
|
if ($handler[1]->isPrivate() || $handler[1]->isProtected()) {
|
||||||
$method = 'set' . ucfirst($property->getName());
|
$method = 'set' . ucfirst($handler[1]->getName());
|
||||||
if (!method_exists($handler[0], $method)) {
|
if (!method_exists($handler[0], $method)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$handler[0]->$method($injectValue);
|
$handler[0]->$method($injectValue);
|
||||||
} else {
|
} else {
|
||||||
$handler[0]->{$property->getName()} = $injectValue;
|
$handler[0]->{$handler[1]->getName()} = $injectValue;
|
||||||
}
|
}
|
||||||
return $handler[0];
|
return $handler[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user