/** * Get method to retreive single result and fill model * @param mixed * @return DibiResult */ public function load() { if ($args = func_get_args()) { $this->where($args); } $result = $this->getDataSource()->fetch(); if (Environment::getConfig('perform')->profiler) { PerfORMController::addSql(dibi::$sql); } $this->getModel()->fill($result); return $result ? $this->getModel() : false; }
protected function profiler() { if ($this->profiler) { PerfORMController::addSql(dibi::$sql); $this->profiler = false; } }