/** * @param array|bool $data * @return LiteObject */ protected function createInstance($data = false) { if ($this->mapper) { return $this->mapper->getObject($data); } else { /** @var LiteObject $instance */ $instance = new $this->className(); if ($data) { $instance->fromArray($data); } return $instance; } }
/** * @param mixed $rawValue * @return mixed */ public function toObjectValue($rawValue) { return $this->mapper->getObject($rawValue, $this->className); }