Postmark\PostmarkClient::fixHeaders PHP Метод

fixHeaders() приватный Метод

The Postmark API wants an Array of Key-Value pairs, not a dictionary object, therefore, we need to wrap the elements in an array.
private fixHeaders ( $headers )
    private function fixHeaders($headers)
    {
        $retval = NULL;
        if ($headers != NULL) {
            $retval = array();
            $index = 0;
            foreach ($headers as $key => $value) {
                $retval[$index] = array('Name' => $key, 'Value' => $value);
                $index++;
            }
        }
        return $retval;
    }