protected function renderCustomExtensions() { $endpoints = $this->listEndpoints(); if (empty($endpoints)) { return ''; } return c::renderKeyValue('endpoints', c::renderArray($endpoints)); }
protected function renderCommand() { $command = $this->command; $prefix = ''; if (preg_match('~^([A-Z][A-Za-z0-9]+\\s\\+\\s)(.+?)$~', $command, $m)) { $prefix = $m[1]; $command = $m[2]; } elseif ($command[0] !== '/') { $prefix = 'PluginDir + '; $command = '/' . $command; } $parts = preg_split('/\\s+/', $command, -1, PREG_SPLIT_NO_EMPTY); array_unshift($parts, c::alreadyRendered($prefix . c::renderString(array_shift($parts)))); return c::renderKeyValue('command', c::renderArray($parts)); }
protected function renderCommandProperty($commandId, $propertyName = 'check_command') { return c::renderKeyValue($propertyName, c::renderString($this->connection->getCommandName($commandId))); }
public function toConfigString() { $out = ''; foreach ($this->vars as $key => $var) { $out .= c::renderKeyValue('vars.' . c::escapeIfReserved($key), $var->toConfigString()); } return $out; }
protected function renderPassword() { return c::renderKeyValue('password', c::renderString('***')); }
public function toConfigString() { if (empty($this->arguments)) { return ''; } $args = array(); foreach ($this->arguments as $arg) { $args[$arg->argument_name] = $arg->toConfigString(); } return c::renderKeyValue('arguments', c::renderDictionary($args)); }