コード例 #1
0
 /**
  * Display all commands
  *
  * @param string $parameters
  */
 public function show($parameters = null)
 {
     $filters = array();
     if (isset($parameters)) {
         $filters = array($this->object->getUniqueLabelField() => "%" . $parameters . "%");
     }
     $params = array('command_id', 'command_name', 'command_type', 'command_line');
     $paramString = str_replace("command_", "", implode($this->delim, $params));
     echo $paramString . "\n";
     $elements = $this->object->getList($params, -1, 0, null, null, $filters);
     foreach ($elements as $tab) {
         $tab['command_line'] = CentreonUtils::convertSpecialPattern(html_entity_decode($tab['command_line']));
         $tab['command_type'] = $this->typeConversion[$tab['command_type']];
         echo implode($this->delim, $tab) . "\n";
     }
 }