public function factory() { if (!$this->_factory) { $this->_factory = AppFactory::get($this->app); } return $this->_factory; }