public function createConnection($object, $connection = null, $parameters = null, array $headers = null)
	{
		if ($this->oauth->isAuthenticated())
		{
			// Build the request path.
			if ($connection != null)
			{
				$path = $object . '/' . $connection;
			}
			else
			{
				$path = $object;
			}

			// Send the post request.
			$response = $this->oauth->query($this->fetchUrl($path), $parameters, $headers, 'post');

			return json_decode($response->body);
		}
		else
		{
			return false;
		}
	}
public function createConnection($object, $connection = null, $parameters = null, array $headers = null)
	{
		if ($this->oauth->isAuthenticated())
		{
			// Build the request path.
			if ($connection != null)
			{
				$path = $object . '/' . $connection;
			}
			else
			{
				$path = $object;
			}

			// Send the post request.
			$response = $this->oauth->query($this->fetchUrl($path), $parameters, $headers, 'post');

			return json_decode($response->body);
		}
		else
		{
			return false;
		}
	}
public function createConnection ( $ object , $ connection = null , $ parameters = null , array $ headers = null ) { if ( $ this -> oauth -> isAuthenticated ( ) ) { // Build the request path. if ( $ connection != null ) { $ path = $ object . '/' . $ connection ; } else { $ path = $ object ; } // Send the post request. $ response = $ this -> oauth -> query ( $ this -> fetchUrl ( $ path ) , $ parameters , $ headers , 'post' ) ; return json_decode ( $ response -> body ) ; } else { return false ; } }
Method to create a connection.

@param   string  $object      The object id.
@param   string  $connection  The object's connection name.
@param   array   $parameters  The POST request parameters.
@param   array   $headers     An array of name-value pairs to include in the header of the request

@return  mixed   The decoded JSON response or false if the client is not authenticated.

@since   1.0
Method to create a connection .