in($primaryId, $value); } else { $_model = $model::find()->where(['t1.' . $primaryId => $value]); } $this->_relation = $relation->bindIdentification($model, $_model); $this->model = $model; $this->primaryId = $primaryId; $this->value = $value; } abstract public function get(); /** * @param $name * @return mixed */ public function __get($name) { if (empty($this->value)) { return null; } return $this->get(); } }