改名
This commit is contained in:
@@ -132,6 +132,10 @@ class Annotation extends Component
|
||||
*/
|
||||
private function resolveMethod(ReflectionClass $reflect, $class, $alias, $object)
|
||||
{
|
||||
$targets = $reflect->getAttributes(Target::class);
|
||||
if (empty($targets)) {
|
||||
return;
|
||||
}
|
||||
foreach ($reflect->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
|
||||
if ($method->class != $class) {
|
||||
continue;
|
||||
|
||||
@@ -112,9 +112,6 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
||||
} else {
|
||||
$this->_relation = Context::getContext(Relation::class);
|
||||
}
|
||||
|
||||
$this->_fields = static::getColumns()->format();
|
||||
|
||||
$this->createAnnotation();
|
||||
}
|
||||
|
||||
@@ -663,8 +660,11 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
#[Pure] public function has($attribute): bool
|
||||
public function has($attribute): bool
|
||||
{
|
||||
if (empty($this->_fields)) {
|
||||
$this->_fields = static::getColumns()->format();
|
||||
}
|
||||
return array_key_exists($attribute, $this->_fields);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user