/** * Returns an end-user interface instance, creating it if it does not * already exist and using a default class if none has been set. * * @return Phergie_Ui_Abstract */ public function getUi() { if (empty($this->ui)) { $this->ui = new Phergie_Ui_Console(); $this->ui->setEnabled($this->getConfig('ui.enabled')); $this->getConfig('ui.format', false) && $this->ui->setFormat($this->getConfig('ui.format')); } return $this->ui; }