* @author Icinga Development Team */ // {{{ICINGA_LICENSE_HEADER}}} use Icinga\Monitoring\Command\Meta; /** * Class MonitoringCommands */ class Zend_View_Helper_MonitoringCommands extends Zend_View_Helper_Abstract { /** * Type of small interface style */ const TYPE_SMALL = 'small'; /** * Type of full featured interface style */ const TYPE_FULL = 'full'; /** * Returns the object type from object * @param stdClass $object * @return string */ public function getObjectType(\stdClass $object) { return array_shift(explode('_', array_shift(array_keys(get_object_vars($object))), 2)); } public function monitoringCommands(\stdClass $object, $type) { $type = $this->getObjectType($object); $commands = new Meta(); var_dump($commands->getCommandsForObject($object)); var_dump($type); } }