src/Clients/GuzzleClient.php
public function formatPostParameters(Array $postParameters=array())
    {
        $guzzleParams = array();
        /**
         * There are three possibile inputs for $postParameter values.  Strings, Curlfiles, and arrays.
         * This look should process them in to something that Guzzle understands.
         */
        foreach ($postParameters as $key => $value) {
            if ($value instanceof \CURLFile) {
                $guzzleParams[] = array(
                    'name' => $key, 
                    'contents' => fopen($value->getFilename(), 'r'), 
                    'filename' => $value->getPostFilename()
                );
            } else if (is_array($value)) {
                foreach ($value as $val) $guzzleParams[] = array('name' => $key . '[]', 'contents' => "$val");
            } else {
                $guzzleParams[] = array('name' => $key, 'contents' => "$value");
            }
        }
        
        return $guzzleParams;
    }
public function formatPostParameters(Array $postParameters=array())
    {
        $guzzleParams = array();
        /**
         * There are three possibile inputs for $postParameter values.  Strings, Curlfiles, and arrays.
         * This look should process them in to something that Guzzle understands.
         */
        foreach ($postParameters as $key => $value) {
            if ($value instanceof \CURLFile) {
                $guzzleParams[] = array(
                    'name' => $key, 
                    'contents' => fopen($value->getFilename(), 'r'), 
                    'filename' => $value->getPostFilename()
                );
            } else if (is_array($value)) {
                foreach ($value as $val) $guzzleParams[] = array('name' => $key . '[]', 'contents' => "$val");
            } else {
                $guzzleParams[] = array('name' => $key, 'contents' => "$value");
            }
        }
        
        return $guzzleParams;
    }
public function formatPostParameters ( Array $ postParameters = array ( ) ) { $ guzzleParams = array ( ) ; /**
         * There are three possibile inputs for $postParameter values.  Strings, Curlfiles, and arrays.
         * This look should process them in to something that Guzzle understands.
         */ foreach ( $ postParameters as $ key => $ value ) { if ( $ value instanceof \ CURLFile ) { $ guzzleParams [ ] = array ( 'name' => $ key , 'contents' => fopen ( $ value -> getFilename ( ) , 'r' ) , 'filename' => $ value -> getPostFilename ( ) ) ; } else if ( is_array ( $ value ) ) { foreach ( $ value as $ val ) $ guzzleParams [ ] = array ( 'name' => $ key . '[]' , 'contents' => "$val" ) ; } else { $ guzzleParams [ ] = array ( 'name' => $ key , 'contents' => "$value" ) ; } } return $ guzzleParams ; }
Return a Guzzle post parameter array that can be entered in to the 'multipart'
argument of a post request.  For details on this, see the Guzzle
documentation here: http://docs.guzzlephp.org/en/latest/request-options.html#multipart

@params  Array   $postParameters
@return  Array
Return a Guzzle post parameter array that can be entered in to the multipart argument of a post request . For details on this see the Guzzle documentation here : http : // docs . guzzlephp . org / en / latest / request - options . html#multipart