public function query($query, $structure = null)
	{
		// Check the type of query to decide what to return
		list($type) = explode(' ', $query, 2);
		$type       = strtolower($type);

		// Default structure if needed
		if ($type == 'select' && is_null($structure))
		{
			$structure = 'rows';
		}

		$this->connection->prepare($query)->bind($this->syntax->getBindings());

		$result = (isset($structure))
		        ? $this->connection->{constant('self::' . strtoupper($structure))}()
		        : $this->connection->query();

		return $result;
	}
public function query($query, $structure = null)
	{
		// Check the type of query to decide what to return
		list($type) = explode(' ', $query, 2);
		$type       = strtolower($type);

		// Default structure if needed
		if ($type == 'select' && is_null($structure))
		{
			$structure = 'rows';
		}

		$this->connection->prepare($query)->bind($this->syntax->getBindings());

		$result = (isset($structure))
		        ? $this->connection->{constant('self::' . strtoupper($structure))}()
		        : $this->connection->query();

		return $result;
	}
public function query ( $ query , $ structure = null ) { // Check the type of query to decide what to return list ( $ type ) = explode ( ' ' , $ query , 2 ) ; $ type = strtolower ( $ type ) ; // Default structure if needed if ( $ type == 'select' && is_null ( $ structure ) ) { $ structure = 'rows' ; } $ this -> connection -> prepare ( $ query ) -> bind ( $ this -> syntax -> getBindings ( ) ) ; $ result = ( isset ( $ structure ) ) ? $ this -> connection -> { constant ( 'self::' . strtoupper ( $ structure ) ) } ( ) : $ this -> connection -> query ( ) ; return $ result ; }
Performs the actual query and returns the results

@param   string  $query      The query to perform
@param   string  $structure  The structure of the item(s) returned (if applicable)
@return  mixed
@since   2.0.0
Performs the actual query and returns the results