Example #1
0
 /**
  * Registra o caminho dos scripts de view baseando-se no controller informado.
  *
  * @param br\gov\sial\core\mvcb\controller\ControllerAbstract $ctrl
  * @return br\gov\sial\core\mvcb\view\ViewAbstract
  * @example ViewAbstract::registerViewScriptBasedFromController
  * @code
  * <?php
  *      ...
  *      class FooController extends ControllerAbstract ()
  *      {
  *      }
  *      ...
  *      $fooController = new FooController();
  *      $this->registerViewScriptBasedFromController($fooController);
  * ?>
  * @encode
  * */
 public function registerViewScriptBasedFromController(ControllerAbstract $ctrl)
 {
     $scriptPath = current(explode('mvcb', $ctrl->getClassName())) . 'mvcb' . self::NAMESPACE_SEPARATOR . 'view' . self::NAMESPACE_SEPARATOR . 'scripts' . self::NAMESPACE_SEPARATOR . $this::T_TYPE;
     $this->addScriptPath(Location::realpathFromNamespace($scriptPath));
     return $this;
 }
Example #2
0
 /**
  * Construtor.
  *
  * @param \br\gov\sial\core\exception\SIALException $siale
  * */
 public function __construct(\br\gov\sial\core\exception\SIALException $siale)
 {
     parent::__construct();
     $this->_exception = $siale;
 }