createValue()
createValue(mixed $value): \Google\AdsApi\AdManager\v202111\Value
Creates a PQL `Value` from the specified value.
For example:
- A
TextValue
for a value of typestring
. - A
BooleanValue
for typebool
. - A
NumberValue
for typefloat
orint
. - A
DateTimeValue
for type Ad ManagerDateTime
- A
DateValue
for type Ad ManagerDate
- A
SetValue
for typearray
.
If the specified value is already a PQL Value
, the value is returned.
Parameters
mixed | $value | the value to convert to a PQL value |
Throws
- \InvalidArgumentException
if value cannot be converted
Returns
\Google\AdsApi\AdManager\v202111\Value —a PQL value of the appropriate type