src/Knp/PiwikClient/Connection/PiwikConnection.php
protected function convertParamsToQuery(array $params)
    {
        $query = array();

        foreach ($params as $key => $val) {
            if (is_array($val)) {
                $val = implode(',', $val);
            } elseif ($val instanceof \DateTime) {
                $val = $val->format('Y-m-d');
            } elseif (is_bool($val)) {
                if ($val) {
                    $val = 1;
                } else {
                    continue;
                }
            } else {
                $val = urlencode($val);
            }
            $query[] = $key . '=' . $val;
        }

        return implode('&', $query);
    }
protected function convertParamsToQuery(array $params)
    {
        $query = array();

        foreach ($params as $key => $val) {
            if (is_array($val)) {
                $val = implode(',', $val);
            } elseif ($val instanceof \DateTime) {
                $val = $val->format('Y-m-d');
            } elseif (is_bool($val)) {
                if ($val) {
                    $val = 1;
                } else {
                    continue;
                }
            } else {
                $val = urlencode($val);
            }
            $query[] = $key . '=' . $val;
        }

        return implode('&', $query);
    }
protected function convertParamsToQuery ( array $ params ) { $ query = array ( ) ; foreach ( $ params as $ key => $ val ) { if ( is_array ( $ val ) ) { $ val = implode ( ',' , $ val ) ; } elseif ( $ val instanceof \ DateTime ) { $ val = $ val -> format ( 'Y-m-d' ) ; } elseif ( is_bool ( $ val ) ) { if ( $ val ) { $ val = 1 ; } else { continue ; } } else { $ val = urlencode ( $ val ) ; } $ query [ ] = $ key . '=' . $ val ; } return implode ( '&' , $ query ) ; }
Convert hash of parameters to query string.

@param array $params hash

@return string query string
Convert hash of parameters to query string .