Example #1
0
 /**
  * Detects if provided model is same as current one.
  *
  * @param model|\ReflectionClass|string|model_relation_model $model
  * @return bool true if provided model is same as current one
  */
 public function isSameModel($model)
 {
     if ($this->isVirtual()) {
         return $model instanceof model_relation_model && $model->isVirtual() && $model->set == $this->set;
     }
     return model::normalizeModel($model)->getName() == $this->reflection->getName();
 }