public function toArray()
	{
		if (!$this->getMethod()) {
			throw new \InvalidArgumentException('Method must be provided for request');
		}

		$data = array(
			'jsonrpc' => self::VERSION,
			'method'  => $this->getMethod(),
		);

		if ($this->getParams()) {
			$data['params'] = $this->getParams();
		}

		if ($this->getId()) {
			$data['id'] = $this->getId();
		}

		return $data;
	}
public function toArray()
	{
		if (!$this->getMethod()) {
			throw new \InvalidArgumentException('Method must be provided for request');
		}

		$data = array(
			'jsonrpc' => self::VERSION,
			'method'  => $this->getMethod(),
		);

		if ($this->getParams()) {
			$data['params'] = $this->getParams();
		}

		if ($this->getId()) {
			$data['id'] = $this->getId();
		}

		return $data;
	}
public function toArray ( ) { if ( ! $ this -> getMethod ( ) ) { throw new \ InvalidArgumentException ( 'Method must be provided for request' ) ; } $ data = array ( 'jsonrpc' => self :: VERSION , 'method' => $ this -> getMethod ( ) , ) ; if ( $ this -> getParams ( ) ) { $ data [ 'params' ] = $ this -> getParams ( ) ; } if ( $ this -> getId ( ) ) { $ data [ 'id' ] = $ this -> getId ( ) ; } return $ data ; }
Serialize into array

@throws \InvalidArgumentException
@return array
Serialize into array