/**
  * Constructor
  */
 public function __construct($proxyName = null, $data = null)
 {
     $this->facade = Facade::getInstance();
     $this->proxyName = !empty($proxyName) ? $proxyName : self::NAME;
     if (!is_null($data)) {
         $this->setData($data);
     }
 }
 public function __construct()
 {
     $this->facade = Facade::getInstance();
 }
 /**
  * Test hasCommand method.
  */
 public function testHasCommand()
 {
     // register the ControllerTestCommand to handle 'hasCommandTest' notes
     $facade = Facade::getInstance();
     $facade->registerCommand('facadeHasCommandTest', new FacadeTestCommand());
     // test that hasCommand returns true for hasCommandTest notifications
     $this->assertTrue($facade->hasCommand('facadeHasCommandTest') == true, "Expecting facade->hasCommand('facadeHasCommandTest') == true");
     // Remove the Command from the Controller
     $facade->removeCommand('facadeHasCommandTest');
     // test that hasCommand returns false for hasCommandTest notifications
     $this->assertTrue($facade->hasCommand('facadeHasCommandTest') == false, "Expecting facade->hasCommand('facadeHasCommandTest') == false");
 }
 /**
  * Tests the hasCore and removeCore methods
  */
 public function testHasCoreAndRemoveCore()
 {
     // assert that the Facade.hasCore method returns false first
     $this->assertTrue(Facade::hasCore('FacadeTestKey11') == false, "Expecting Facade::hasCore('FacadeTestKey11') == false");
     // register a Core
     $facade = Facade::getInstance('FacadeTestKey11');
     // assert that the Facade.hasCore method returns true now that a Core is registered
     $this->assertTrue(Facade::hasCore('FacadeTestKey11') == true, "Expecting Facade::hasCore('FacadeTestKey11') == true");
     // remove the Core
     Facade::removeCore('FacadeTestKey11');
     // assert that the Facade.hasCore method returns false now that the core has been removed.
     $this->assertTrue(Facade::hasCore('FacadeTestKey11') == false, "Expecting Facade::hasCore('FacadeTestKey11') == false");
 }
 /**
  * Constructor.
  */
 public function __construct($mediatorName = null, $viewComponent = null)
 {
     $this->facade = Facade::getInstance();
     $this->viewComponent = $viewComponent;
     $this->mediatorName = !empty($mediatorName) ? $mediatorName : self::NAME;
 }
 /**
  * Return the Multiton Facade instance
  *
  * @throws Exception if multitonKey for this Notifier is not yet initialized.
  * @return Facade The Facade instance for this Notifier multitonKey.
  */
 protected function facade()
 {
     if (!isset($this->multitonKey)) {
         throw new Exception(self::MULTITON_MSG);
     }
     return Facade::getInstance($this->multitonKey);
 }