改名
This commit is contained in:
+1
-20
@@ -104,13 +104,6 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
protected array $rules = [];
|
protected array $rules = [];
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Relation|null
|
|
||||||
*/
|
|
||||||
#[Inject(Relation::class)]
|
|
||||||
protected ?Relation $_relation;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
@@ -221,15 +214,6 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param Relation $relation
|
|
||||||
*/
|
|
||||||
public function setRelation(Relation $relation)
|
|
||||||
{
|
|
||||||
$this->_relation = $relation;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@@ -237,9 +221,6 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
{
|
{
|
||||||
$an = Kiri::app()->getAnnotation();
|
$an = Kiri::app()->getAnnotation();
|
||||||
$an->injectProperty($this);
|
$an->injectProperty($this);
|
||||||
|
|
||||||
|
|
||||||
var_dump($this->_relation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -786,7 +767,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
|
|||||||
*/
|
*/
|
||||||
public function getRelation(): ?Relation
|
public function getRelation(): ?Relation
|
||||||
{
|
{
|
||||||
return $this->_relation;
|
return Kiri::getDi()->get(Relation::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user