src/Knp/PiwikClient/Client.php
public function call($method, array $params = array(), $format = 'php')
    {
        $params['method']       = $method;
        $params['token_auth']   = $this->token;
        $params['format']       = $format;

        $data = $this->getConnection()->send($params);

        if ('php' === $format) {
            $object = unserialize($data);

            if (isset($object['result']) && 'error' === $object['result']) {
                throw new Exception($object['message']);
            }

            return $object;
        } else {
            return $data;
        }
    }
public function call($method, array $params = array(), $format = 'php')
    {
        $params['method']       = $method;
        $params['token_auth']   = $this->token;
        $params['format']       = $format;

        $data = $this->getConnection()->send($params);

        if ('php' === $format) {
            $object = unserialize($data);

            if (isset($object['result']) && 'error' === $object['result']) {
                throw new Exception($object['message']);
            }

            return $object;
        } else {
            return $data;
        }
    }
public function call ( $ method , array $ params = array ( ) , $ format = 'php' ) { $ params [ 'method' ] = $ method ; $ params [ 'token_auth' ] = $ this -> token ; $ params [ 'format' ] = $ format ; $ data = $ this -> getConnection ( ) -> send ( $ params ) ; if ( 'php' === $ format ) { $ object = unserialize ( $ data ) ; if ( isset ( $ object [ 'result' ] ) && 'error' === $ object [ 'result' ] ) { throw new Exception ( $ object [ 'message' ] ) ; } return $ object ; } else { return $ data ; } }
Call specific method & return it's response.

@param string $method method name
@param array  $params method parameters
@param string $format return format (php, json, xml, csv, tsv, html, rss)

@return mixed
Call specific method & return it s response .