Output the formatted properties or methods.

@see lithium\console\command\Help::_properties()
@see lithium\console\command\Help::_methods()
@param array $params From `_properties()` or `_methods()`.
@return void
490016
protected function _render($params) {
		foreach ($params as $name => $param) {
			if ($name === 'run' || empty($param['name'])) {
				continue;
			}
			$usage = (!empty($param['usage'])) ? trim($param['usage'], ' []') : $param['name'];
			$this->out($this->_pad($usage), 'option');

			if ($param['description']) {
				$this->out($this->_pad($param['description'], 2));
			}
			$this->nl();
		}
	}
1043870
protected function runConsole(array $params): void
    {
        $kernel = $this->app->make(KernelContract::class);

        $status = $kernel->handle(
            $input = new ArgvInput(array_values($params)),
            new ConsoleOutput()
        );

        $kernel->terminate($input, $status);

        exit($status);
    }
1280348
public function call(array $params)
    {
        $this->initResolver();

        /**
         * makes sure that 'format' is passed and that 'API' and 'method'
         * parameters are not overwritten by defaults nor by call parameters
         */
        $defaults = array_merge(array('format' => $this->format), $this->defaultParams);
        $this->resolver->setDefaults($defaults);
        $this->resolver->setMandatory(array(
            'module' => 'API',
            'method' => $this->name()
        ));

        return $this->piwikClient->call($this->url(), $this->resolver->resolve($params));
    }
470512
private function resetParams($params)
    {
        $keys = is_array($params) ? $params : func_get_args();

        foreach ($keys as $key) {
            if (property_exists($this, $key))
                $this->$key = null;
        }
    }
431423
private function initCommand($param)
    {
        if (!preg_match('/^[a-z]+:[a-z]+$/', $param)) {
            $this->options['command'] = $param;

            return;
        }
        
        $part = explode(':', $param);

        $this->options['command'] = $part[0];

        $this->options['action'] = $part[1];
    }
926132
public function logReplyParams($params) {
    $paramsString = '';

    foreach ($params as $k => $v) {
      $paramsString .= "$k=" . print_r($v, true) . "\r\n";
    }

    $this->writeLog(sprintf($this->debugStrings['replyParams'], date('Y-m-d H:i:s'), $paramsString));
  }
644171
public function render(array $params = []) {
        return trim(String::insert($this->getStatement(), $params + $this->getParams(), ['escape' => false])) . ';';
    }
648135
private function initialize($params = array())
	{
		if (count($params) > 0)
		{
			foreach ($params as $key => $value)
			{
				if (isset($this->{$key}))
				{
					$this->{$key} = $value;
				}
				else if (strpos($key, 'CURLOPT_') === 0) 
				{
					curl_setopt($this->ch, $key, $value);    
				}
			}
		}
	}
450317
public function setParams($params)
    {
        // $param should be a single key => value pair
        if (is_array($params)) {
            foreach ($params as $key => $param) {
                $this->params[$key] = $param;
            }
        }
    }
1360810
public function setParameters(array $params)
	{
		foreach ($params as $paramName => $paramValue)
		{
			$this->setParameter($paramName, $paramValue);
		}
	}
225880
public function checkParams(array $params)
    {
        foreach ($params as $p) {
            $config = config('kregel.warden.models');
            $configKeys = array_keys($config);
//            dd($p, $config, $configKeys, !in_array($p, $config), !in_array($p, $configKeys), !in_array($p, $configKeys) && !in_array($p, $config));
            if (in_array($p, $configKeys) && in_array($p, $config)) {
                throw new \Exception('You\'re attempting to use a value that isn\'t in the config! '.print_r($configKeys, true));
            }
        }
    }
627558
public function setParams(array $params)
    {
        foreach ($this->params as $param) {
            if (!array_key_exists($param, $params)) {
                $methodName = 'unset'.ucfirst($param);

                if (method_exists($this, $methodName)) {
                    call_user_func(
                        [$this, $methodName]
                    );
                    continue;
                }
            }

            if (property_exists($this, $param)) {
                $methodName = 'set'.ucfirst($param);

                if (method_exists($this, $methodName)) {
                    call_user_func(
                        [$this, $methodName],
                        $params[$param]
                    );
                }
            }
        }

        return $this;
    }
713159
public function printUpdates($updates) {
    /**
     * @var string $method_name
     * @var Update $update
     */
    foreach ($updates as $method_name => $update) {
      $this->output->writeln(" - $method_name: {$update->description}");
    }
    $this->output->writeln('');
  }
955725
public function setParams(array $params = null)
    {
        $this->params = $params;
        if (null !== $params && empty($params)) {
            $this->params = null;
        }
    }
1122987
protected function _normalizeParams(array &$params)
    {
        ksort($params, \SORT_STRING);
        array_walk($params, function (&$value) {
            if (is_numeric($value)) {
                $value = (string)$value;
            }
        });

        if (isset($params['?'])) {
            $this->_normalizeParams($params['?']);
        }
    }
502585
public function prepare($params)
    {
        $this->params = !empty($params) ? $params[ 0 ] : [ ];

        // force mandatory fields
        $this->filter();
        $this->maxRecords();
    }
993203
public function index($properties)
    {
        $properties = (array) $properties;

        foreach ($properties as $property)
        {
            $this->addCommand('index', ['property' => $property]);
        }
    }