改名
This commit is contained in:
@@ -168,7 +168,7 @@ class Annotation extends Component
|
|||||||
}
|
}
|
||||||
foreach ($this->_classes[$className] as $_method => $class) {
|
foreach ($this->_classes[$className] as $_method => $class) {
|
||||||
if ($method == $_method) {
|
if ($method == $_method) {
|
||||||
return [$class];
|
return [$class, $_method];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@@ -665,6 +665,10 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function __get($name): mixed
|
public function __get($name): mixed
|
||||||
{
|
{
|
||||||
|
$attributes = Snowflake::app()->getAttributes();
|
||||||
|
$callback = $attributes->getByClass(static::class, $name);
|
||||||
|
var_dump($callback);
|
||||||
|
|
||||||
$method = 'get' . ucfirst($name);
|
$method = 'get' . ucfirst($name);
|
||||||
if (method_exists($this, $method . 'Attribute')) {
|
if (method_exists($this, $method . 'Attribute')) {
|
||||||
return $this->{$method . 'Attribute'}($this->_attributes[$name] ?? null);
|
return $this->{$method . 'Attribute'}($this->_attributes[$name] ?? null);
|
||||||
|
|||||||
Reference in New Issue
Block a user