protected function factory() { if (empty($this->factory)) { $this->config->theme($this->theme); $this->factory = new Factory($this->config); } return $this->factory; }