modify
This commit is contained in:
@@ -134,14 +134,13 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->event = Snowflake::app()->getEvent();
|
|
||||||
if (!Context::hasContext(Relation::class)) {
|
if (!Context::hasContext(Relation::class)) {
|
||||||
$relation = Snowflake::createObject(Relation::class);
|
$relation = Snowflake::createObject(Relation::class);
|
||||||
$this->_relation = Context::setContext(Relation::class, $relation);
|
$this->_relation = Context::setContext(Relation::class, $relation);
|
||||||
} else {
|
} else {
|
||||||
$this->_relation = Context::getContext(Relation::class);
|
$this->_relation = Context::getContext(Relation::class);
|
||||||
}
|
}
|
||||||
// $this->createAnnotation();
|
$this->createAnnotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -150,8 +149,8 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
*/
|
*/
|
||||||
public function createAnnotation()
|
public function createAnnotation()
|
||||||
{
|
{
|
||||||
// $annotation = Snowflake::getAnnotation();
|
$annotation = Snowflake::getAnnotation();
|
||||||
// $annotation->injectProperty($this);
|
$annotation->injectProperty($this);
|
||||||
// $methods = $annotation->getMethods(get_called_class());
|
// $methods = $annotation->getMethods(get_called_class());
|
||||||
// foreach ($methods as $method => $attributes) {
|
// foreach ($methods as $method => $attributes) {
|
||||||
// foreach ($attributes as $attribute) {
|
// foreach ($attributes as $attribute) {
|
||||||
|
|||||||
Reference in New Issue
Block a user