PHP Class Pql, googleads-php-lib

显示文件 Open project: googleads/googleads-php-lib Class Usage Examples

Public Methods

Method Description
CombineResultSets ( ResultSet $first, ResultSet $second ) Combines the first and second result sets, if and only if, the columns of both result sets match.
CreateValue ( mixed $value ) : Value Creates a {@link Value} from the value i.e., a {@link TextValue} for a value of type {@code string}, {@link BooleanValue} for type {@code bool}, {@link NumberValue} for type {@code float}, or {@code int}, {@link DateTimeValue} for type {@link DfpDateTime}, {@link DateValue} for type {@link Date}, and {@link SetValue} for type {@code array}. If the value is a {@code Value}, the value is returned. If the value is {@code null}, an empty {@link TextValue} is returned.
GetColumnLabels ( ResultSet $resultSet ) : array Gets the column labels for the result set.
GetRowStringValues ( Row $row ) : array Gets the values in a row of the result set in the form of a string list.
ToString ( Value $value ) : string Creates a String from the Value.

Private Methods

Method Description
__construct ( ) {@link Pql} is meant to be used statically.

Method Details

CombineResultSets() public static method

Combines the first and second result sets, if and only if, the columns of both result sets match.
public static CombineResultSets ( ResultSet $first, ResultSet $second )
$first ResultSet
$second ResultSet

CreateValue() public static method

Creates a {@link Value} from the value i.e., a {@link TextValue} for a value of type {@code string}, {@link BooleanValue} for type {@code bool}, {@link NumberValue} for type {@code float}, or {@code int}, {@link DateTimeValue} for type {@link DfpDateTime}, {@link DateValue} for type {@link Date}, and {@link SetValue} for type {@code array}. If the value is a {@code Value}, the value is returned. If the value is {@code null}, an empty {@link TextValue} is returned.
public static CreateValue ( mixed $value ) : Value
$value mixed the value to convert
return Value the constructed value of the appropriate type

GetColumnLabels() public static method

Gets the column labels for the result set.
public static GetColumnLabels ( ResultSet $resultSet ) : array
$resultSet ResultSet the result set to get the column labels for
return array the string list of column labels

GetRowStringValues() public static method

Gets the values in a row of the result set in the form of a string list.
public static GetRowStringValues ( Row $row ) : array
$row Row the row to get the values for
return array the string list of row labels

ToString() public static method

Creates a String from the Value.
public static ToString ( Value $value ) : string
$value Value the value to convert
return string the string representation of the value