Ixudra\Curl\Builder::forgeOptions PHP 메소드

forgeOptions() 보호된 메소드

Convert the curlOptions to an array of usable options for the cURL request
protected forgeOptions ( ) : array
리턴 array
    protected function forgeOptions()
    {
        $results = array();
        foreach ($this->curlOptions as $key => $value) {
            $arrayKey = constant('CURLOPT_' . $key);
            if (!$this->packageOptions['containsFile'] && $key == 'POSTFIELDS' && is_array($value)) {
                $results[$arrayKey] = http_build_query($value, null, '&');
            } else {
                $results[$arrayKey] = $value;
            }
        }
        return $results;
    }