CS: Fixes for controllers: Static, Action, List and Show

refs #4611
This commit is contained in:
Marius Hein 2013-09-24 12:48:30 +02:00
parent 4b97742371
commit e7696bec89
4 changed files with 24 additions and 13 deletions

View File

@ -33,6 +33,9 @@ use \Icinga\Application\Icinga;
use \Icinga\Application\Config as IcingaConfig; use \Icinga\Application\Config as IcingaConfig;
use \Icinga\Application\Logger; use \Icinga\Application\Logger;
/**
* Delivery static content to clients
*/
class StaticController extends ActionController class StaticController extends ActionController
{ {
/** /**
@ -132,7 +135,7 @@ class StaticController extends ActionController
} }
/** /**
* Set cache header for this respone * Set cache header for this response
* *
* @param integer $maxAge The maximum age to set * @param integer $maxAge The maximum age to set
*/ */

View File

@ -28,6 +28,7 @@
namespace Icinga\Web\Controller; namespace Icinga\Web\Controller;
use \Exception;
use \Zend_Controller_Action; use \Zend_Controller_Action;
use \Zend_Controller_Request_Abstract; use \Zend_Controller_Request_Abstract;
use \Zend_Controller_Front; use \Zend_Controller_Front;
@ -36,7 +37,6 @@ use \Zend_Controller_Action_HelperBroker;
use \Zend_Layout; use \Zend_Layout;
use \Icinga\Authentication\Manager as AuthManager; use \Icinga\Authentication\Manager as AuthManager;
use \Icinga\Application\Benchmark; use \Icinga\Application\Benchmark;
use \Exception;
use \Icinga\Application\Config; use \Icinga\Application\Config;
use \Icinga\Web\Notification; use \Icinga\Web\Notification;
use \Icinga\Web\Widget\Tabs; use \Icinga\Web\Widget\Tabs;
@ -237,16 +237,20 @@ class ActionController extends Zend_Controller_Action
* using the version with "_" forces us to use deprecated code. So we try to catch this issue by looking for methods * using the version with "_" forces us to use deprecated code. So we try to catch this issue by looking for methods
* with the same name, but with a "_" prefix prepended. * with the same name, but with a "_" prefix prepended.
* *
* @param string $name The method name to check * @param string $name The method name to check
* @param array $params The method parameters * @param mixed $params The method parameters
* @return mixed Anything the method returns
*/ */
public function __call($name, $params) public function __call($name, $params)
{ {
$deprecatedMethod = '_'.$name; $deprecatedMethod = '_' . $name;
if (method_exists($this, $deprecatedMethod)) { if (method_exists($this, $deprecatedMethod)) {
return call_user_func_array(array($this, $deprecatedMethod), $params); return call_user_func_array(array($this, $deprecatedMethod), $params);
} }
return parent::__call($name, $params);
parent::__call($name, $params);
return null;
} }
} }

View File

@ -39,6 +39,9 @@ use \Icinga\Module\Monitoring\Backend;
use \Icinga\Web\Widget\SortBox; use \Icinga\Web\Widget\SortBox;
use \Icinga\Application\Config as IcingaConfig; use \Icinga\Application\Config as IcingaConfig;
/**
* Controller for listing views
*/
class Monitoring_ListController extends ActionController class Monitoring_ListController extends ActionController
{ {
/** /**

View File

@ -28,14 +28,15 @@
// @codingStandardsIgnoreStart // @codingStandardsIgnoreStart
use \Icinga\Module\Monitoring\Backend; use \Icinga\Module\Monitoring\Backend;
use Icinga\Web\Controller\ActionController; use \Icinga\Web\Controller\ActionController;
use Icinga\Web\Hook; use \Icinga\Web\Hook;
use \Icinga\Module\Monitoring\Object\Host; use \Icinga\Module\Monitoring\Object\Host;
use \Icinga\Module\Monitoring\Object\Service; use \Icinga\Module\Monitoring\Object\Service;
use Icinga\Application\Benchmark; use \Icinga\Application\Benchmark;
use Icinga\Web\Widget\Tabextension\OutputFormat; use \Icinga\Web\Widget\Tabextension\OutputFormat;
use Icinga\Web\Widget\Tabextension\DashboardAction; use \Icinga\Web\Widget\Tabextension\DashboardAction;
use Icinga\Web\Widget\Tabextension\BasketAction; use \Icinga\Web\Widget\Tabextension\BasketAction;
use \Icinga\Web\Widget\Tabs;
/** /**
* Class Monitoring_ShowController * Class Monitoring_ShowController
@ -355,7 +356,7 @@ class Monitoring_ShowController extends ActionController
/** /**
* Creating tabs for this controller * Creating tabs for this controller
* @return \Icinga\Web\Widget\AbstractWidget * @return Tabs
*/ */
protected function createTabs() protected function createTabs()
{ {