This commit is contained in:
as2252258@163.com
2021-04-24 19:40:10 +08:00
parent 8d6dcd1cca
commit d58ca2919b
2 changed files with 1 additions and 4 deletions
-1
View File
@@ -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);
}
+1 -3
View File
@@ -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)) {