Documentation

Expr extends Message
in package

An abstract representation of a common expression.

Expressions are abstractly represented as a collection of identifiers, select statements, function calls, literals, and comprehensions. All operators with the exception of the '.' operator are modelled as function calls. This makes it easy to represent new operators into the existing AST. All references within expressions must resolve to a [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an expression to be valid. A reference may either be a bare identifier name or a qualified identifier google.api.name. References may either refer to a value or a function declaration. For example, the expression google.api.name.startsWith('expr') references the declaration google.api.name within a [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the function declaration startsWith.

Generated from protobuf message google.api.expr.v1alpha1.Expr

Table of Contents

Properties

$expr_kind  : mixed
$id  : mixed
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.

Methods

__construct()  : mixed
Constructor.
getCallExpr()  : Call|null
A call expression, including calls to predefined functions and operators.
getComprehensionExpr()  : Comprehension|null
A comprehension expression.
getConstExpr()  : Constant|null
A literal expression.
getExprKind()  : string
getId()  : int|string
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
getIdentExpr()  : Ident|null
An identifier expression.
getListExpr()  : CreateList|null
A list creation expression.
getSelectExpr()  : Select|null
A field selection expression, e.g. `request.auth`.
getStructExpr()  : CreateStruct|null
A map or message creation expression.
hasCallExpr()  : mixed
hasComprehensionExpr()  : mixed
hasConstExpr()  : mixed
hasIdentExpr()  : mixed
hasListExpr()  : mixed
hasSelectExpr()  : mixed
hasStructExpr()  : mixed
setCallExpr()  : $this
A call expression, including calls to predefined functions and operators.
setComprehensionExpr()  : $this
A comprehension expression.
setConstExpr()  : $this
A literal expression.
setId()  : $this
Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.
setIdentExpr()  : $this
An identifier expression.
setListExpr()  : $this
A list creation expression.
setSelectExpr()  : $this
A field selection expression, e.g. `request.auth`.
setStructExpr()  : $this
A map or message creation expression.

Properties

$expr_kind

protected mixed $expr_kind

$id

Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.

protected mixed $id = 0

Generated from protobuf field int64 id = 2 [json_name = "id"];

Methods

__construct()

Constructor.

public __construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
$data : array<string|int, mixed> = NULL

{ Optional. Data for populating the Message object.

@type int|string $id
      Required. An id assigned to this node by the parser which is unique in a
      given expression tree. This is used to associate type information and other
      attributes to a node in the parse tree.
@type \Google\Api\Expr\V1alpha1\Constant $const_expr
      A literal expression.
@type \Google\Api\Expr\V1alpha1\Expr\Ident $ident_expr
      An identifier expression.
@type \Google\Api\Expr\V1alpha1\Expr\Select $select_expr
      A field selection expression, e.g. `request.auth`.
@type \Google\Api\Expr\V1alpha1\Expr\Call $call_expr
      A call expression, including calls to predefined functions and operators.
@type \Google\Api\Expr\V1alpha1\Expr\CreateList $list_expr
      A list creation expression.
@type \Google\Api\Expr\V1alpha1\Expr\CreateStruct $struct_expr
      A map or message creation expression.
@type \Google\Api\Expr\V1alpha1\Expr\Comprehension $comprehension_expr
      A comprehension expression.

}

getCallExpr()

A call expression, including calls to predefined functions and operators.

public getCallExpr() : Call|null

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Call call_expr = 6 [json_name = "callExpr"];

Return values
Call|null

getComprehensionExpr()

A comprehension expression.

public getComprehensionExpr() : Comprehension|null

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];

Return values
Comprehension|null

getConstExpr()

A literal expression.

public getConstExpr() : Constant|null

Generated from protobuf field .google.api.expr.v1alpha1.Constant const_expr = 3 [json_name = "constExpr"];

Return values
Constant|null

getExprKind()

public getExprKind() : string
Return values
string

getId()

Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.

public getId() : int|string

Generated from protobuf field int64 id = 2 [json_name = "id"];

Return values
int|string

getIdentExpr()

An identifier expression.

public getIdentExpr() : Ident|null

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];

Return values
Ident|null

getListExpr()

A list creation expression.

public getListExpr() : CreateList|null

Generated from protobuf field .google.api.expr.v1alpha1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];

Return values
CreateList|null

getSelectExpr()

A field selection expression, e.g. `request.auth`.

public getSelectExpr() : Select|null

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Select select_expr = 5 [json_name = "selectExpr"];

Return values
Select|null

getStructExpr()

A map or message creation expression.

public getStructExpr() : CreateStruct|null

Generated from protobuf field .google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];

Return values
CreateStruct|null

hasCallExpr()

public hasCallExpr() : mixed

hasComprehensionExpr()

public hasComprehensionExpr() : mixed

hasConstExpr()

public hasConstExpr() : mixed

hasIdentExpr()

public hasIdentExpr() : mixed

hasListExpr()

public hasListExpr() : mixed

hasSelectExpr()

public hasSelectExpr() : mixed

hasStructExpr()

public hasStructExpr() : mixed

setCallExpr()

A call expression, including calls to predefined functions and operators.

public setCallExpr(Call $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Call call_expr = 6 [json_name = "callExpr"];

Parameters
$var : Call
Return values
$this

setComprehensionExpr()

A comprehension expression.

public setComprehensionExpr(Comprehension $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Comprehension comprehension_expr = 9 [json_name = "comprehensionExpr"];

Parameters
$var : Comprehension
Return values
$this

setConstExpr()

A literal expression.

public setConstExpr(Constant $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Constant const_expr = 3 [json_name = "constExpr"];

Parameters
$var : Constant
Return values
$this

setId()

Required. An id assigned to this node by the parser which is unique in a given expression tree. This is used to associate type information and other attributes to a node in the parse tree.

public setId(int|string $var) : $this

Generated from protobuf field int64 id = 2 [json_name = "id"];

Parameters
$var : int|string
Return values
$this

setIdentExpr()

An identifier expression.

public setIdentExpr(Ident $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Ident ident_expr = 4 [json_name = "identExpr"];

Parameters
$var : Ident
Return values
$this

setListExpr()

A list creation expression.

public setListExpr(CreateList $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Expr.CreateList list_expr = 7 [json_name = "listExpr"];

Parameters
$var : CreateList
Return values
$this

setSelectExpr()

A field selection expression, e.g. `request.auth`.

public setSelectExpr(Select $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Expr.Select select_expr = 5 [json_name = "selectExpr"];

Parameters
$var : Select
Return values
$this

setStructExpr()

A map or message creation expression.

public setStructExpr(CreateStruct $var) : $this

Generated from protobuf field .google.api.expr.v1alpha1.Expr.CreateStruct struct_expr = 8 [json_name = "structExpr"];

Parameters
$var : CreateStruct
Return values
$this

        
On this page

Search results