daryast

Untitled

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