/** * Запустить запрос к базе данных, когда потребуется. * Часть реализации шаблона Lazy Load. */ protected function notifyAccess() { if (!$this->run) { $this->raw = $this->table->execute()->fetchAll(); $this->total = count($this->raw); } $this->run = true; }