modify
This commit is contained in:
@@ -54,7 +54,6 @@ class Annotation extends Component
|
||||
public function addRelate(string $class, string $setName, string $method)
|
||||
{
|
||||
$this->_model_relate[$class . '::' . $setName] = $method;
|
||||
var_dump($this->_model_relate);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -850,12 +850,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
||||
public function __get($name): mixed
|
||||
{
|
||||
$value = $this->_attributes[$name] ?? null;
|
||||
var_dump($value);
|
||||
|
||||
$loader = Snowflake::app()->getAnnotation();
|
||||
|
||||
var_dump($value);
|
||||
if (!empty($method = $loader->getGetMethodName(get_called_class(), $name))) {
|
||||
var_dump(get_called_class() . '::' . $method);
|
||||
return $this->{$method}(...[$value]);
|
||||
}
|
||||
if (array_key_exists($name, $this->_attributes)) {
|
||||
|
||||
Reference in New Issue
Block a user