改名
This commit is contained in:
@@ -242,10 +242,9 @@ class Loader extends BaseObject
|
|||||||
}
|
}
|
||||||
$_method[] = $attribute->newInstance();
|
$_method[] = $attribute->newInstance();
|
||||||
}
|
}
|
||||||
|
if (!empty($_method)) {
|
||||||
static::$_methods[$replace->getName()][$method->getName()] = $_method;
|
static::$_methods[$replace->getName()][$method->getName()] = $_method;
|
||||||
|
}
|
||||||
$_array['methods'][$method->getName()] = $_method;
|
|
||||||
}
|
}
|
||||||
return $_array;
|
return $_array;
|
||||||
}
|
}
|
||||||
@@ -268,10 +267,9 @@ class Loader extends BaseObject
|
|||||||
}
|
}
|
||||||
$_property[] = $attribute->newInstance();
|
$_property[] = $attribute->newInstance();
|
||||||
}
|
}
|
||||||
|
if (!empty($_property)) {
|
||||||
static::$_property[$replace->getName()][$method->getName()] = $_property;
|
static::$_property[$replace->getName()][$method->getName()] = $_property;
|
||||||
|
}
|
||||||
$_array['property'][$method->getName()] = $_property;
|
|
||||||
}
|
}
|
||||||
return $_array;
|
return $_array;
|
||||||
}
|
}
|
||||||
@@ -348,7 +346,7 @@ class Loader extends BaseObject
|
|||||||
if ($annotations === null) {
|
if ($annotations === null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
foreach ($annotations['methods'] as $name => $attribute) {
|
foreach (static::$_methods[$className] as $name => $attribute) {
|
||||||
$this->methods($annotations, $attribute, $annotation, $className, $name);
|
$this->methods($annotations, $attribute, $annotation, $className, $name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,9 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->container = Snowflake::app();
|
$this->container = Snowflake::app();
|
||||||
|
|
||||||
|
$an = Snowflake::app()->getAnnotation();
|
||||||
|
$an->injectProperty($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user