daryast

Untitled

Apr 11th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <?php
  2.  
  3. class DebugutilsModule extends CWebServiceModule
  4. {
  5.  
  6. public function init()
  7. {
  8. // this method is called when the module is being created
  9. // you may place code here to customize the module or the application
  10.  
  11. // import the module-level models and components
  12. $this->setImport(array(
  13. 'debugutils.models.*',
  14. 'debugutils.components.*',
  15. ));
  16. }
  17.  
  18. public function beforeControllerAction($controller, $action)
  19. {
  20. if (parent::beforeControllerAction($controller, $action)) {
  21. // this method is called before any module controller action is performed
  22. // you may place customized code here
  23. return true;
  24. } else
  25. return false;
  26. }
  27.  
  28. public function getUrlRules()
  29. {
  30. $rules = array('debugutils/test/<exturl:.*>' => array('debugutils/default/test'));
  31. return array_merge($rules, parent::getUrlRules());
  32.  
  33. }
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment