PHPDaemon\Clients\HTTP\Connection::customRequestHeaders PHP Method

customRequestHeaders() protected method

protected customRequestHeaders ( array $headers )
$headers array
    protected function customRequestHeaders($headers)
    {
        foreach ($headers as $key => $item) {
            if (is_numeric($key)) {
                if (is_string($item)) {
                    $this->writeln($item);
                } elseif (is_array($item)) {
                    $this->writeln($item[0] . ': ' . $item[1]);
                    // @TODO: prevent injections?
                }
            } else {
                $this->writeln($key . ': ' . $item);
            }
        }
    }