public function send($query = null, array $options = []) {
		$query = !is_object($query) ? new Query((array) $query) : $query;
		$method = $query->method() ?: "get";
		$path = $query->path();
		$data = $query->data();
		$insert = (array) $options + $data + $query->export($this);

		if (preg_match_all('/\{:(\w+)\}/', $path, $matches)) {
			$data = array_diff_key($data,  array_flip($matches[1]));
		}
		return $this->connection->{$method}(
			Text::insert($path, $insert, ['clean' => true]),
			$data + (array) $query->conditions() + ['limit' => $query->limit()],
			(array) $options
		);
	}
public function send($query = null, array $options = []) {
		$query = !is_object($query) ? new Query((array) $query) : $query;
		$method = $query->method() ?: "get";
		$path = $query->path();
		$data = $query->data();
		$insert = (array) $options + $data + $query->export($this);

		if (preg_match_all('/\{:(\w+)\}/', $path, $matches)) {
			$data = array_diff_key($data,  array_flip($matches[1]));
		}
		return $this->connection->{$method}(
			Text::insert($path, $insert, ['clean' => true]),
			$data + (array) $query->conditions() + ['limit' => $query->limit()],
			(array) $options
		);
	}
public function send ( $ query = null , array $ options = [ ] ) { $ query = ! is_object ( $ query ) ? new Query ( ( array ) $ query ) : $ query ; $ method = $ query -> method ( ) ? : "get" ; $ path = $ query -> path ( ) ; $ data = $ query -> data ( ) ; $ insert = ( array ) $ options + $ data + $ query -> export ( $ this ) ; if ( preg_match_all ( '/\{:(\w+)\}/' , $ path , $ matches ) ) { $ data = array_diff_key ( $ data , array_flip ( $ matches [ 1 ] ) ) ; } return $ this -> connection -> { $ method } ( Text :: insert ( $ path , $ insert , [ 'clean' => true ] ) , $ data + ( array ) $ query -> conditions ( ) + [ 'limit' => $ query -> limit ( ) ] , ( array ) $ options ) ; }
Method to send to a specific resource.

@param array $query a query object
@param array $options array.
@return mixed
Method to send to a specific resource .