ControllerBase.php 525 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace controllers;
  3. use Ubiquity\controllers\Controller;
  4. use Ubiquity\utils\http\URequest;
  5. /**
  6. * ControllerBase.
  7. **/
  8. abstract class ControllerBase extends Controller{
  9. protected $headerView = "@activeTheme/main/vHeader.html";
  10. protected $footerView = "@activeTheme/main/vFooter.html";
  11. public function initialize() {
  12. if (! URequest::isAjax ()) {
  13. $this->loadView ( $this->headerView );
  14. }
  15. }
  16. public function finalize() {
  17. if (! URequest::isAjax ()) {
  18. $this->loadView ( $this->footerView );
  19. }
  20. }
  21. }