PHP Class FeedFunction, googleads-php-lib

It is of the form (Operand... Operator Operand...) We can represent expressions like this easily:

For example "feed_attribute == 30" can be represented as:
FeedId feedId = (FeedId of Feed associated with feed_attribute)
FeedAttributeId feedAttributeId = (FeedAttributeId of feed_attribute)
Function function = new Function();
function.setLhsOperand(
Arrays.asList((Operand) new FeedAttributeOperand(feedId, feedAttributeId)));
function.setOperator(Operator.IN);
function.setRhsOperand(
Arrays.asList((Operand) new ConstantOperand(30L)));
Another example matching on multiple values:
"feed_item_id IN (10, 20, 30)" can be represented as:

Function function = new Function();
function.setLhsOperand(
Arrays.asList((Operand) new RequestContextOperand(ContextType.FEED_ITEM_ID)));
function.setOperator(Operator.IN);
function.setRhsOperand(Arrays.asList(
(Operand) new ConstantOperand(10L), new ConstantOperand(20L), new ConstantOperand(30L)));
Mostra file Open project: googleads/googleads-php-lib

Public Properties

Property Type Description
$functionString string
$lhsOperand FunctionArgumentOperand[]
$operator tnsFunctionOperator
$rhsOperand FunctionArgumentOperand[]

Public Methods

Method Description
__construct ( $operator = null, $lhsOperand = null, $rhsOperand = null, $functionString = null )
getNamespace ( ) : string Gets the namesapce of this class
getXsiTypeName ( ) : string Gets the xsi:type name of this class

Method Details

__construct() public method

public __construct ( $operator = null, $lhsOperand = null, $rhsOperand = null, $functionString = null )

getNamespace() public method

Gets the namesapce of this class
public getNamespace ( ) : string
return string the namespace of this class

getXsiTypeName() public method

Gets the xsi:type name of this class
public getXsiTypeName ( ) : string
return string the xsi:type name of this class

Property Details

$functionString public_oe property

public string $functionString
return string

$lhsOperand public_oe property

public FunctionArgumentOperand[] $lhsOperand
return FunctionArgumentOperand[]

$operator public_oe property

public tnsFunctionOperator $operator
return tnsFunctionOperator

$rhsOperand public_oe property

public FunctionArgumentOperand[] $rhsOperand
return FunctionArgumentOperand[]