getUi() 공개 메소드

Returns an end-user interface instance, creating it if it does not already exist and using a default class if none has been set.
public getUi ( ) : Phergie_Ui_Abstract
리턴 Phergie_Ui_Abstract
예제 #1
0
파일: Abstract.php 프로젝트: hjr3/phergie
 /**
  * Gets the required class refences from Phergie_Bot.
  *
  * @param Phergie_Bot $bot     Current bot instance in use
  * @param array       $options Optional processor arguments
  *
  * @return void
  */
 public function __construct(Phergie_Bot $bot, array $options = array())
 {
     $this->driver = $bot->getDriver();
     $this->plugins = $bot->getPluginHandler();
     $this->connections = $bot->getConnectionHandler();
     $this->events = $bot->getEventHandler();
     $this->ui = $bot->getUi();
     $this->options = $options;
 }
예제 #2
0
 /**
  * Tests that a custom end-user interface can be set.
  *
  * @return void
  */
 public function testSetUi()
 {
     $ui = $this->getMockUi();
     $this->bot->setUi($ui);
     $this->assertSame($ui, $this->bot->getUi());
 }