Module refinery.lib.scripts.php.model

Expand source code Browse git
from __future__ import annotations

import enum

from dataclasses import dataclass, field

from refinery.lib.scripts import Expression, Node, Statement


class PhpNameKind(enum.Enum):
    UNQUALIFIED = 'unqualified'
    QUALIFIED = 'qualified'
    FULLY_QUALIFIED = 'fully-qualified'
    RELATIVE = 'relative'


class PhpUseKind(enum.Enum):
    NORMAL = 'normal'
    FUNCTION = 'function'
    CONSTANT = 'const'


class PhpVisibility(enum.Enum):
    PUBLIC = 'public'
    PROTECTED = 'protected'
    PRIVATE = 'private'


class PhpClassKind(enum.Enum):
    CLASS = 'class'
    INTERFACE = 'interface'
    TRAIT = 'trait'
    ENUM = 'enum'


@dataclass(repr=False, eq=False)
class PhpScript(Node):
    body: list[Statement] = field(default_factory=list)
    errors: list[PhpErrorNode] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpErrorNode(Expression, Statement):
    text: str = ''
    message: str = ''


@dataclass(repr=False, eq=False)
class PhpName(Expression):
    parts: list[str] = field(default_factory=list)
    kind: PhpNameKind = PhpNameKind.UNQUALIFIED


@dataclass(repr=False, eq=False)
class PhpIdentifier(Expression):
    name: str = ''


@dataclass(repr=False, eq=False)
class PhpVariable(Expression):
    name: str = ''


@dataclass(repr=False, eq=False)
class PhpVariableVariable(Expression):
    expression: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpIntLiteral(Expression):
    value: int = 0
    raw: str = '0'


@dataclass(repr=False, eq=False)
class PhpFloatLiteral(Expression):
    value: float = 0.0
    raw: str = '0.0'


@dataclass(repr=False, eq=False)
class PhpStringLiteral(Expression):
    value: str = ''
    raw: str = "''"


@dataclass(repr=False, eq=False)
class PhpInterpolatedString(Expression):
    raw: str = '""'


@dataclass(repr=False, eq=False)
class PhpHeredoc(Expression):
    raw: str = ''
    nowdoc: bool = False


@dataclass(repr=False, eq=False)
class PhpShellExec(Expression):
    raw: str = '``'


@dataclass(repr=False, eq=False)
class PhpBooleanLiteral(Expression):
    value: bool = False
    raw: str = 'true'


@dataclass(repr=False, eq=False)
class PhpNullLiteral(Expression):
    raw: str = 'null'

    @property
    def value(self):
        return None


@dataclass(repr=False, eq=False)
class PhpMagicConstant(Expression):
    name: str = ''


@dataclass(repr=False, eq=False)
class PhpArray(Expression):
    items: list[PhpArrayItem | None] = field(default_factory=list)
    short: bool = True


@dataclass(repr=False, eq=False)
class PhpArrayItem(Node):
    value: Expression | None = None
    key: Expression | None = None
    by_ref: bool = False
    spread: bool = False


@dataclass(repr=False, eq=False)
class PhpBinaryExpression(Expression):
    operator: str = ''
    left: Expression | None = None
    right: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpUnaryExpression(Expression):
    operator: str = ''
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpUpdateExpression(Expression):
    operator: str = ''
    operand: Expression | None = None
    prefix: bool = False


@dataclass(repr=False, eq=False)
class PhpCastExpression(Expression):
    cast: str = ''
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpErrorSuppress(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpAssignment(Expression):
    operator: str = '='
    target: Expression | None = None
    value: Expression | None = None
    by_ref: bool = False


@dataclass(repr=False, eq=False)
class PhpTernary(Expression):
    condition: Expression | None = None
    consequent: Expression | None = None
    alternate: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpParenExpression(Expression):
    expression: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpInstanceof(Expression):
    operand: Expression | None = None
    class_name: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpArg(Node):
    value: Expression | None = None
    name: str | None = None
    spread: bool = False
    by_ref: bool = False


@dataclass(repr=False, eq=False)
class PhpFirstClassCallable(Node):
    pass


@dataclass(repr=False, eq=False)
class PhpFunctionCall(Expression):
    callee: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    first_class_callable: bool = False


@dataclass(repr=False, eq=False)
class PhpMethodCall(Expression):
    receiver: Expression | None = None
    method: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    nullsafe: bool = False
    first_class_callable: bool = False


@dataclass(repr=False, eq=False)
class PhpStaticCall(Expression):
    class_name: Expression | None = None
    method: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    first_class_callable: bool = False


@dataclass(repr=False, eq=False)
class PhpNew(Expression):
    class_name: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    has_parens: bool = False


@dataclass(repr=False, eq=False)
class PhpNewAnonymous(Expression):
    args: list[PhpArg] = field(default_factory=list)
    declaration: PhpClass | None = None
    has_parens: bool = False


@dataclass(repr=False, eq=False)
class PhpClone(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpPropertyFetch(Expression):
    receiver: Expression | None = None
    name: Expression | None = None
    nullsafe: bool = False


@dataclass(repr=False, eq=False)
class PhpStaticPropertyFetch(Expression):
    class_name: Expression | None = None
    name: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpClassConstFetch(Expression):
    class_name: Expression | None = None
    name: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpArrayDimFetch(Expression):
    receiver: Expression | None = None
    index: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpClosure(Expression):
    params: list[PhpParam] = field(default_factory=list)
    uses: list[PhpClosureUse] = field(default_factory=list)
    return_type: Expression | None = None
    body: PhpBlock | None = None
    is_static: bool = False
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpClosureUse(Node):
    variable: PhpVariable | None = None
    by_ref: bool = False


@dataclass(repr=False, eq=False)
class PhpArrowFunction(Expression):
    params: list[PhpParam] = field(default_factory=list)
    return_type: Expression | None = None
    body: Expression | None = None
    is_static: bool = False
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpMatch(Expression):
    subject: Expression | None = None
    arms: list[PhpMatchArm] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpMatchArm(Node):
    conditions: list[Expression] = field(default_factory=list)
    body: Expression | None = None
    is_default: bool = False


@dataclass(repr=False, eq=False)
class PhpList(Expression):
    items: list[PhpArrayItem | None] = field(default_factory=list)
    short: bool = False


@dataclass(repr=False, eq=False)
class PhpIsset(Expression):
    variables: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpEmpty(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpEval(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpInclude(Expression):
    kind: str = 'include'
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpExit(Expression):
    operand: Expression | None = None
    keyword: str = 'exit'


@dataclass(repr=False, eq=False)
class PhpPrint(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpThrowExpression(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpYield(Expression):
    key: Expression | None = None
    value: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpYieldFrom(Expression):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpConstFetch(Expression):
    name: PhpName | None = None


@dataclass(repr=False, eq=False)
class PhpNullableType(Expression):
    type: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpUnionType(Expression):
    types: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpIntersectionType(Expression):
    types: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpParam(Node):
    name: str = ''
    type: Expression | None = None
    default: Expression | None = None
    by_ref: bool = False
    variadic: bool = False
    visibility: PhpVisibility | None = None
    readonly: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpAttribute(Node):
    name: PhpName | None = None
    args: list[PhpArg] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpAttributeGroup(Node):
    attributes: list[PhpAttribute] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpExpressionStatement(Statement):
    expression: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpInlineHTML(Statement):
    value: str = ''


@dataclass(repr=False, eq=False)
class PhpEchoTagStatement(Statement):
    expressions: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpEcho(Statement):
    expressions: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpBlock(Statement):
    body: list[Statement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpIf(Statement):
    condition: Expression | None = None
    consequent: list[Statement] = field(default_factory=list)
    elseifs: list[PhpElseIf] = field(default_factory=list)
    alternate: list[Statement] | None = None
    alternative_syntax: bool = False


@dataclass(repr=False, eq=False)
class PhpElseIf(Node):
    condition: Expression | None = None
    body: list[Statement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpWhile(Statement):
    condition: Expression | None = None
    body: list[Statement] = field(default_factory=list)
    alternative_syntax: bool = False


@dataclass(repr=False, eq=False)
class PhpDoWhile(Statement):
    body: list[Statement] = field(default_factory=list)
    condition: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpFor(Statement):
    init: list[Expression] = field(default_factory=list)
    condition: list[Expression] = field(default_factory=list)
    update: list[Expression] = field(default_factory=list)
    body: list[Statement] = field(default_factory=list)
    alternative_syntax: bool = False


@dataclass(repr=False, eq=False)
class PhpForeach(Statement):
    subject: Expression | None = None
    key: Expression | None = None
    value: Expression | None = None
    by_ref: bool = False
    body: list[Statement] = field(default_factory=list)
    alternative_syntax: bool = False


@dataclass(repr=False, eq=False)
class PhpSwitch(Statement):
    subject: Expression | None = None
    cases: list[PhpCase] = field(default_factory=list)
    alternative_syntax: bool = False


@dataclass(repr=False, eq=False)
class PhpCase(Node):
    test: Expression | None = None
    body: list[Statement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpBreak(Statement):
    level: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpContinue(Statement):
    level: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpReturn(Statement):
    value: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpGoto(Statement):
    label: str = ''


@dataclass(repr=False, eq=False)
class PhpLabel(Statement):
    name: str = ''


@dataclass(repr=False, eq=False)
class PhpThrowStatement(Statement):
    operand: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpTry(Statement):
    body: list[Statement] = field(default_factory=list)
    catches: list[PhpCatch] = field(default_factory=list)
    finally_body: list[Statement] | None = None


@dataclass(repr=False, eq=False)
class PhpCatch(Node):
    types: list[PhpName] = field(default_factory=list)
    variable: PhpVariable | None = None
    body: list[Statement] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpUnset(Statement):
    variables: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpGlobal(Statement):
    variables: list[Expression] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpStaticVar(Statement):
    declarations: list[PhpStaticVarDeclaration] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpStaticVarDeclaration(Node):
    variable: Expression | None = None
    default: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpNop(Statement):
    pass


@dataclass(repr=False, eq=False)
class PhpHaltCompiler(Statement):
    remainder: str = ''


@dataclass(repr=False, eq=False)
class PhpFunctionDeclaration(Statement):
    name: str = ''
    params: list[PhpParam] = field(default_factory=list)
    return_type: Expression | None = None
    body: PhpBlock | None = None
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpClass(Statement):
    name: str = ''
    kind: PhpClassKind = PhpClassKind.CLASS
    extends: list[PhpName] = field(default_factory=list)
    implements: list[PhpName] = field(default_factory=list)
    members: list[Statement] = field(default_factory=list)
    modifiers: list[str] = field(default_factory=list)
    enum_backing_type: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpClassConst(Statement):
    consts: list[PhpConstDeclaration] = field(default_factory=list)
    modifiers: list[str] = field(default_factory=list)
    type: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpConstDeclaration(Node):
    name: str = ''
    value: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpProperty(Statement):
    props: list[PhpPropertyDeclaration] = field(default_factory=list)
    modifiers: list[str] = field(default_factory=list)
    type: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpPropertyDeclaration(Node):
    variable: PhpVariable | None = None
    default: Expression | None = None


@dataclass(repr=False, eq=False)
class PhpClassMethod(Statement):
    name: str = ''
    params: list[PhpParam] = field(default_factory=list)
    return_type: Expression | None = None
    body: PhpBlock | None = None
    modifiers: list[str] = field(default_factory=list)
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpEnumCase(Statement):
    name: str = ''
    value: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpTraitUse(Statement):
    traits: list[PhpName] = field(default_factory=list)
    adaptations: list[PhpTraitAdaptation] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpTraitAdaptation(Node):
    trait: PhpName | None = None
    method: str = ''
    kind: str = 'alias'
    new_name: str | None = None
    new_modifier: str | None = None
    insteadof: list[PhpName] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpNamespace(Statement):
    name: PhpName | None = None
    body: list[Statement] | None = None


@dataclass(repr=False, eq=False)
class PhpUse(Statement):
    uses: list[PhpUseItem] = field(default_factory=list)
    kind: PhpUseKind = PhpUseKind.NORMAL


@dataclass(repr=False, eq=False)
class PhpUseItem(Node):
    name: PhpName | None = None
    alias: str | None = None
    kind: PhpUseKind | None = None


@dataclass(repr=False, eq=False)
class PhpGroupUse(Statement):
    prefix: PhpName | None = None
    uses: list[PhpUseItem] = field(default_factory=list)
    kind: PhpUseKind = PhpUseKind.NORMAL


@dataclass(repr=False, eq=False)
class PhpConst(Statement):
    consts: list[PhpConstDeclaration] = field(default_factory=list)


@dataclass(repr=False, eq=False)
class PhpDeclare(Statement):
    directives: list[PhpDeclareDirective] = field(default_factory=list)
    body: list[Statement] | None = None
    alternative_syntax: bool = False


@dataclass(repr=False, eq=False)
class PhpDeclareDirective(Node):
    name: str = ''
    value: Expression | None = None

Classes

class PhpNameKind (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class PhpNameKind(enum.Enum):
    UNQUALIFIED = 'unqualified'
    QUALIFIED = 'qualified'
    FULLY_QUALIFIED = 'fully-qualified'
    RELATIVE = 'relative'

Ancestors

  • enum.Enum

Class variables

var UNQUALIFIED

The type of the None singleton.

var QUALIFIED

The type of the None singleton.

var FULLY_QUALIFIED

The type of the None singleton.

var RELATIVE

The type of the None singleton.

class PhpUseKind (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class PhpUseKind(enum.Enum):
    NORMAL = 'normal'
    FUNCTION = 'function'
    CONSTANT = 'const'

Ancestors

  • enum.Enum

Class variables

var NORMAL

The type of the None singleton.

var FUNCTION

The type of the None singleton.

var CONSTANT

The type of the None singleton.

class PhpVisibility (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class PhpVisibility(enum.Enum):
    PUBLIC = 'public'
    PROTECTED = 'protected'
    PRIVATE = 'private'

Ancestors

  • enum.Enum

Class variables

var PUBLIC

The type of the None singleton.

var PROTECTED

The type of the None singleton.

var PRIVATE

The type of the None singleton.

class PhpClassKind (*args, **kwds)

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

Color.RED

  • value lookup:

Color(1)

  • name lookup:

Color['RED']

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

Expand source code Browse git
class PhpClassKind(enum.Enum):
    CLASS = 'class'
    INTERFACE = 'interface'
    TRAIT = 'trait'
    ENUM = 'enum'

Ancestors

  • enum.Enum

Class variables

var CLASS

The type of the None singleton.

var INTERFACE

The type of the None singleton.

var TRAIT

The type of the None singleton.

var ENUM

The type of the None singleton.

class PhpScript (offset=-1, parent=None, leading_comments=<factory>, body=<factory>, errors=<factory>)

PhpScript(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[Statement]' = , errors: 'list[PhpErrorNode]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpScript(Node):
    body: list[Statement] = field(default_factory=list)
    errors: list[PhpErrorNode] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

var errors

The type of the None singleton.

Inherited members

class PhpErrorNode (offset=-1, parent=None, leading_comments=<factory>, text='', message='')

PhpErrorNode(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , text: 'str' = '', message: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpErrorNode(Expression, Statement):
    text: str = ''
    message: str = ''

Ancestors

Instance variables

var text

The type of the None singleton.

var message

The type of the None singleton.

Inherited members

class PhpName (offset=-1, parent=None, leading_comments=<factory>, parts=<factory>, kind=PhpNameKind.UNQUALIFIED)

PhpName(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , parts: 'list[str]' = , kind: 'PhpNameKind' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpName(Expression):
    parts: list[str] = field(default_factory=list)
    kind: PhpNameKind = PhpNameKind.UNQUALIFIED

Ancestors

Instance variables

var parts

The type of the None singleton.

var kind

The type of the None singleton.

Inherited members

class PhpIdentifier (offset=-1, parent=None, leading_comments=<factory>, name='')

PhpIdentifier(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpIdentifier(Expression):
    name: str = ''

Ancestors

Instance variables

var name

The type of the None singleton.

Inherited members

class PhpVariable (offset=-1, parent=None, leading_comments=<factory>, name='')

PhpVariable(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpVariable(Expression):
    name: str = ''

Ancestors

Instance variables

var name

The type of the None singleton.

Inherited members

class PhpVariableVariable (offset=-1, parent=None, leading_comments=<factory>, expression=None)

PhpVariableVariable(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expression: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpVariableVariable(Expression):
    expression: Expression | None = None

Ancestors

Instance variables

var expression

The type of the None singleton.

Inherited members

class PhpIntLiteral (offset=-1, parent=None, leading_comments=<factory>, value=0, raw='0')

PhpIntLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'int' = 0, raw: 'str' = '0')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpIntLiteral(Expression):
    value: int = 0
    raw: str = '0'

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class PhpFloatLiteral (offset=-1, parent=None, leading_comments=<factory>, value=0.0, raw='0.0')

PhpFloatLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'float' = 0.0, raw: 'str' = '0.0')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpFloatLiteral(Expression):
    value: float = 0.0
    raw: str = '0.0'

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class PhpStringLiteral (offset=-1, parent=None, leading_comments=<factory>, value='', raw="''")

PhpStringLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'str' = '', raw: 'str' = "''")

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpStringLiteral(Expression):
    value: str = ''
    raw: str = "''"

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class PhpInterpolatedString (offset=-1, parent=None, leading_comments=<factory>, raw='""')

PhpInterpolatedString(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , raw: 'str' = '""')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpInterpolatedString(Expression):
    raw: str = '""'

Ancestors

Instance variables

var raw

The type of the None singleton.

Inherited members

class PhpHeredoc (offset=-1, parent=None, leading_comments=<factory>, raw='', nowdoc=False)

PhpHeredoc(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , raw: 'str' = '', nowdoc: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpHeredoc(Expression):
    raw: str = ''
    nowdoc: bool = False

Ancestors

Instance variables

var raw

The type of the None singleton.

var nowdoc

The type of the None singleton.

Inherited members

class PhpShellExec (offset=-1, parent=None, leading_comments=<factory>, raw='``')

PhpShellExec(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , raw: 'str' = '``')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpShellExec(Expression):
    raw: str = '``'

Ancestors

Instance variables

var raw

The type of the None singleton.

Inherited members

class PhpBooleanLiteral (offset=-1, parent=None, leading_comments=<factory>, value=False, raw='true')

PhpBooleanLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'bool' = False, raw: 'str' = 'true')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpBooleanLiteral(Expression):
    value: bool = False
    raw: str = 'true'

Ancestors

Instance variables

var value

The type of the None singleton.

var raw

The type of the None singleton.

Inherited members

class PhpNullLiteral (offset=-1, parent=None, leading_comments=<factory>, raw='null')

PhpNullLiteral(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , raw: 'str' = 'null')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpNullLiteral(Expression):
    raw: str = 'null'

    @property
    def value(self):
        return None

Ancestors

Instance variables

var raw

The type of the None singleton.

var value
Expand source code Browse git
@property
def value(self):
    return None

Inherited members

class PhpMagicConstant (offset=-1, parent=None, leading_comments=<factory>, name='')

PhpMagicConstant(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpMagicConstant(Expression):
    name: str = ''

Ancestors

Instance variables

var name

The type of the None singleton.

Inherited members

class PhpArray (offset=-1, parent=None, leading_comments=<factory>, items=<factory>, short=True)

PhpArray(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , items: 'list[PhpArrayItem | None]' = , short: 'bool' = True)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpArray(Expression):
    items: list[PhpArrayItem | None] = field(default_factory=list)
    short: bool = True

Ancestors

Instance variables

var items

The type of the None singleton.

var short

The type of the None singleton.

Inherited members

class PhpArrayItem (offset=-1, parent=None, leading_comments=<factory>, value=None, key=None, by_ref=False, spread=False)

PhpArrayItem(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'Expression | None' = None, key: 'Expression | None' = None, by_ref: 'bool' = False, spread: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpArrayItem(Node):
    value: Expression | None = None
    key: Expression | None = None
    by_ref: bool = False
    spread: bool = False

Ancestors

Instance variables

var value

The type of the None singleton.

var key

The type of the None singleton.

var by_ref

The type of the None singleton.

var spread

The type of the None singleton.

Inherited members

class PhpBinaryExpression (offset=-1, parent=None, leading_comments=<factory>, operator='', left=None, right=None)

PhpBinaryExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operator: 'str' = '', left: 'Expression | None' = None, right: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpBinaryExpression(Expression):
    operator: str = ''
    left: Expression | None = None
    right: Expression | None = None

Ancestors

Instance variables

var operator

The type of the None singleton.

var left

The type of the None singleton.

var right

The type of the None singleton.

Inherited members

class PhpUnaryExpression (offset=-1, parent=None, leading_comments=<factory>, operator='', operand=None)

PhpUnaryExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operator: 'str' = '', operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpUnaryExpression(Expression):
    operator: str = ''
    operand: Expression | None = None

Ancestors

Instance variables

var operator

The type of the None singleton.

var operand

The type of the None singleton.

Inherited members

class PhpUpdateExpression (offset=-1, parent=None, leading_comments=<factory>, operator='', operand=None, prefix=False)

PhpUpdateExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operator: 'str' = '', operand: 'Expression | None' = None, prefix: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpUpdateExpression(Expression):
    operator: str = ''
    operand: Expression | None = None
    prefix: bool = False

Ancestors

Instance variables

var operator

The type of the None singleton.

var operand

The type of the None singleton.

var prefix

The type of the None singleton.

Inherited members

class PhpCastExpression (offset=-1, parent=None, leading_comments=<factory>, cast='', operand=None)

PhpCastExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , cast: 'str' = '', operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpCastExpression(Expression):
    cast: str = ''
    operand: Expression | None = None

Ancestors

Instance variables

var cast

The type of the None singleton.

var operand

The type of the None singleton.

Inherited members

class PhpErrorSuppress (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpErrorSuppress(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpErrorSuppress(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpAssignment (offset=-1, parent=None, leading_comments=<factory>, operator='=', target=None, value=None, by_ref=False)

PhpAssignment(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operator: 'str' = '=', target: 'Expression | None' = None, value: 'Expression | None' = None, by_ref: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpAssignment(Expression):
    operator: str = '='
    target: Expression | None = None
    value: Expression | None = None
    by_ref: bool = False

Ancestors

Instance variables

var operator

The type of the None singleton.

var target

The type of the None singleton.

var value

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpTernary (offset=-1, parent=None, leading_comments=<factory>, condition=None, consequent=None, alternate=None)

PhpTernary(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , condition: 'Expression | None' = None, consequent: 'Expression | None' = None, alternate: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpTernary(Expression):
    condition: Expression | None = None
    consequent: Expression | None = None
    alternate: Expression | None = None

Ancestors

Instance variables

var condition

The type of the None singleton.

var consequent

The type of the None singleton.

var alternate

The type of the None singleton.

Inherited members

class PhpParenExpression (offset=-1, parent=None, leading_comments=<factory>, expression=None)

PhpParenExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expression: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpParenExpression(Expression):
    expression: Expression | None = None

Ancestors

Instance variables

var expression

The type of the None singleton.

Inherited members

class PhpInstanceof (offset=-1, parent=None, leading_comments=<factory>, operand=None, class_name=None)

PhpInstanceof(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None, class_name: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpInstanceof(Expression):
    operand: Expression | None = None
    class_name: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

var class_name

The type of the None singleton.

Inherited members

class PhpArg (offset=-1, parent=None, leading_comments=<factory>, value=None, name=None, spread=False, by_ref=False)

PhpArg(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'Expression | None' = None, name: 'str | None' = None, spread: 'bool' = False, by_ref: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpArg(Node):
    value: Expression | None = None
    name: str | None = None
    spread: bool = False
    by_ref: bool = False

Ancestors

Instance variables

var value

The type of the None singleton.

var name

The type of the None singleton.

var spread

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpFirstClassCallable (offset=-1, parent=None, leading_comments=<factory>)

PhpFirstClassCallable(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpFirstClassCallable(Node):
    pass

Ancestors

Inherited members

class PhpFunctionCall (offset=-1, parent=None, leading_comments=<factory>, callee=None, args=<factory>, first_class_callable=False)

PhpFunctionCall(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , callee: 'Expression | None' = None, args: 'list[PhpArg]' = , first_class_callable: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpFunctionCall(Expression):
    callee: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    first_class_callable: bool = False

Ancestors

Instance variables

var args

The type of the None singleton.

var callee

The type of the None singleton.

var first_class_callable

The type of the None singleton.

Inherited members

class PhpMethodCall (offset=-1, parent=None, leading_comments=<factory>, receiver=None, method=None, args=<factory>, nullsafe=False, first_class_callable=False)

PhpMethodCall(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , receiver: 'Expression | None' = None, method: 'Expression | None' = None, args: 'list[PhpArg]' = , nullsafe: 'bool' = False, first_class_callable: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpMethodCall(Expression):
    receiver: Expression | None = None
    method: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    nullsafe: bool = False
    first_class_callable: bool = False

Ancestors

Instance variables

var args

The type of the None singleton.

var receiver

The type of the None singleton.

var method

The type of the None singleton.

var nullsafe

The type of the None singleton.

var first_class_callable

The type of the None singleton.

Inherited members

class PhpStaticCall (offset=-1, parent=None, leading_comments=<factory>, class_name=None, method=None, args=<factory>, first_class_callable=False)

PhpStaticCall(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , class_name: 'Expression | None' = None, method: 'Expression | None' = None, args: 'list[PhpArg]' = , first_class_callable: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpStaticCall(Expression):
    class_name: Expression | None = None
    method: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    first_class_callable: bool = False

Ancestors

Instance variables

var args

The type of the None singleton.

var class_name

The type of the None singleton.

var method

The type of the None singleton.

var first_class_callable

The type of the None singleton.

Inherited members

class PhpNew (offset=-1, parent=None, leading_comments=<factory>, class_name=None, args=<factory>, has_parens=False)

PhpNew(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , class_name: 'Expression | None' = None, args: 'list[PhpArg]' = , has_parens: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpNew(Expression):
    class_name: Expression | None = None
    args: list[PhpArg] = field(default_factory=list)
    has_parens: bool = False

Ancestors

Instance variables

var args

The type of the None singleton.

var class_name

The type of the None singleton.

var has_parens

The type of the None singleton.

Inherited members

class PhpNewAnonymous (offset=-1, parent=None, leading_comments=<factory>, args=<factory>, declaration=None, has_parens=False)

PhpNewAnonymous(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , args: 'list[PhpArg]' = , declaration: 'PhpClass | None' = None, has_parens: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpNewAnonymous(Expression):
    args: list[PhpArg] = field(default_factory=list)
    declaration: PhpClass | None = None
    has_parens: bool = False

Ancestors

Instance variables

var args

The type of the None singleton.

var declaration

The type of the None singleton.

var has_parens

The type of the None singleton.

Inherited members

class PhpClone (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpClone(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClone(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpPropertyFetch (offset=-1, parent=None, leading_comments=<factory>, receiver=None, name=None, nullsafe=False)

PhpPropertyFetch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , receiver: 'Expression | None' = None, name: 'Expression | None' = None, nullsafe: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpPropertyFetch(Expression):
    receiver: Expression | None = None
    name: Expression | None = None
    nullsafe: bool = False

Ancestors

Instance variables

var receiver

The type of the None singleton.

var name

The type of the None singleton.

var nullsafe

The type of the None singleton.

Inherited members

class PhpStaticPropertyFetch (offset=-1, parent=None, leading_comments=<factory>, class_name=None, name=None)

PhpStaticPropertyFetch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , class_name: 'Expression | None' = None, name: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpStaticPropertyFetch(Expression):
    class_name: Expression | None = None
    name: Expression | None = None

Ancestors

Instance variables

var class_name

The type of the None singleton.

var name

The type of the None singleton.

Inherited members

class PhpClassConstFetch (offset=-1, parent=None, leading_comments=<factory>, class_name=None, name=None)

PhpClassConstFetch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , class_name: 'Expression | None' = None, name: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClassConstFetch(Expression):
    class_name: Expression | None = None
    name: Expression | None = None

Ancestors

Instance variables

var class_name

The type of the None singleton.

var name

The type of the None singleton.

Inherited members

class PhpArrayDimFetch (offset=-1, parent=None, leading_comments=<factory>, receiver=None, index=None)

PhpArrayDimFetch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , receiver: 'Expression | None' = None, index: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpArrayDimFetch(Expression):
    receiver: Expression | None = None
    index: Expression | None = None

Ancestors

Instance variables

var receiver

The type of the None singleton.

var index

The type of the None singleton.

Inherited members

class PhpClosure (offset=-1, parent=None, leading_comments=<factory>, params=<factory>, uses=<factory>, return_type=None, body=None, is_static=False, by_ref=False, attributes=<factory>)

PhpClosure(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , params: 'list[PhpParam]' = , uses: 'list[PhpClosureUse]' = , return_type: 'Expression | None' = None, body: 'PhpBlock | None' = None, is_static: 'bool' = False, by_ref: 'bool' = False, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClosure(Expression):
    params: list[PhpParam] = field(default_factory=list)
    uses: list[PhpClosureUse] = field(default_factory=list)
    return_type: Expression | None = None
    body: PhpBlock | None = None
    is_static: bool = False
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var params

The type of the None singleton.

var uses

The type of the None singleton.

var attributes

The type of the None singleton.

var return_type

The type of the None singleton.

var body

The type of the None singleton.

var is_static

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpClosureUse (offset=-1, parent=None, leading_comments=<factory>, variable=None, by_ref=False)

PhpClosureUse(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , variable: 'PhpVariable | None' = None, by_ref: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClosureUse(Node):
    variable: PhpVariable | None = None
    by_ref: bool = False

Ancestors

Instance variables

var variable

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpArrowFunction (offset=-1, parent=None, leading_comments=<factory>, params=<factory>, return_type=None, body=None, is_static=False, by_ref=False, attributes=<factory>)

PhpArrowFunction(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , params: 'list[PhpParam]' = , return_type: 'Expression | None' = None, body: 'Expression | None' = None, is_static: 'bool' = False, by_ref: 'bool' = False, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpArrowFunction(Expression):
    params: list[PhpParam] = field(default_factory=list)
    return_type: Expression | None = None
    body: Expression | None = None
    is_static: bool = False
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var params

The type of the None singleton.

var attributes

The type of the None singleton.

var return_type

The type of the None singleton.

var body

The type of the None singleton.

var is_static

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpMatch (offset=-1, parent=None, leading_comments=<factory>, subject=None, arms=<factory>)

PhpMatch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , subject: 'Expression | None' = None, arms: 'list[PhpMatchArm]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpMatch(Expression):
    subject: Expression | None = None
    arms: list[PhpMatchArm] = field(default_factory=list)

Ancestors

Instance variables

var arms

The type of the None singleton.

var subject

The type of the None singleton.

Inherited members

class PhpMatchArm (offset=-1, parent=None, leading_comments=<factory>, conditions=<factory>, body=None, is_default=False)

PhpMatchArm(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , conditions: 'list[Expression]' = , body: 'Expression | None' = None, is_default: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpMatchArm(Node):
    conditions: list[Expression] = field(default_factory=list)
    body: Expression | None = None
    is_default: bool = False

Ancestors

Instance variables

var conditions

The type of the None singleton.

var body

The type of the None singleton.

var is_default

The type of the None singleton.

Inherited members

class PhpList (offset=-1, parent=None, leading_comments=<factory>, items=<factory>, short=False)

PhpList(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , items: 'list[PhpArrayItem | None]' = , short: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpList(Expression):
    items: list[PhpArrayItem | None] = field(default_factory=list)
    short: bool = False

Ancestors

Instance variables

var items

The type of the None singleton.

var short

The type of the None singleton.

Inherited members

class PhpIsset (offset=-1, parent=None, leading_comments=<factory>, variables=<factory>)

PhpIsset(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , variables: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpIsset(Expression):
    variables: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var variables

The type of the None singleton.

Inherited members

class PhpEmpty (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpEmpty(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpEmpty(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpEval (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpEval(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpEval(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpInclude (offset=-1, parent=None, leading_comments=<factory>, kind='include', operand=None)

PhpInclude(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , kind: 'str' = 'include', operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpInclude(Expression):
    kind: str = 'include'
    operand: Expression | None = None

Ancestors

Instance variables

var kind

The type of the None singleton.

var operand

The type of the None singleton.

Inherited members

class PhpExit (offset=-1, parent=None, leading_comments=<factory>, operand=None, keyword='exit')

PhpExit(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None, keyword: 'str' = 'exit')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpExit(Expression):
    operand: Expression | None = None
    keyword: str = 'exit'

Ancestors

Instance variables

var operand

The type of the None singleton.

var keyword

The type of the None singleton.

Inherited members

class PhpPrint (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpPrint(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpPrint(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpThrowExpression (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpThrowExpression(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpThrowExpression(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpYield (offset=-1, parent=None, leading_comments=<factory>, key=None, value=None)

PhpYield(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , key: 'Expression | None' = None, value: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpYield(Expression):
    key: Expression | None = None
    value: Expression | None = None

Ancestors

Instance variables

var key

The type of the None singleton.

var value

The type of the None singleton.

Inherited members

class PhpYieldFrom (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpYieldFrom(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpYieldFrom(Expression):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpConstFetch (offset=-1, parent=None, leading_comments=<factory>, name=None)

PhpConstFetch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'PhpName | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpConstFetch(Expression):
    name: PhpName | None = None

Ancestors

Instance variables

var name

The type of the None singleton.

Inherited members

class PhpNullableType (offset=-1, parent=None, leading_comments=<factory>, type=None)

PhpNullableType(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , type: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpNullableType(Expression):
    type: Expression | None = None

Ancestors

Instance variables

var type

The type of the None singleton.

Inherited members

class PhpUnionType (offset=-1, parent=None, leading_comments=<factory>, types=<factory>)

PhpUnionType(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , types: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpUnionType(Expression):
    types: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var types

The type of the None singleton.

Inherited members

class PhpIntersectionType (offset=-1, parent=None, leading_comments=<factory>, types=<factory>)

PhpIntersectionType(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , types: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpIntersectionType(Expression):
    types: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var types

The type of the None singleton.

Inherited members

class PhpParam (offset=-1, parent=None, leading_comments=<factory>, name='', type=None, default=None, by_ref=False, variadic=False, visibility=None, readonly=False, attributes=<factory>)

PhpParam(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', type: 'Expression | None' = None, default: 'Expression | None' = None, by_ref: 'bool' = False, variadic: 'bool' = False, visibility: 'PhpVisibility | None' = None, readonly: 'bool' = False, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpParam(Node):
    name: str = ''
    type: Expression | None = None
    default: Expression | None = None
    by_ref: bool = False
    variadic: bool = False
    visibility: PhpVisibility | None = None
    readonly: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var attributes

The type of the None singleton.

var name

The type of the None singleton.

var type

The type of the None singleton.

var default

The type of the None singleton.

var by_ref

The type of the None singleton.

var variadic

The type of the None singleton.

var visibility

The type of the None singleton.

var readonly

The type of the None singleton.

Inherited members

class PhpAttribute (offset=-1, parent=None, leading_comments=<factory>, name=None, args=<factory>)

PhpAttribute(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'PhpName | None' = None, args: 'list[PhpArg]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpAttribute(Node):
    name: PhpName | None = None
    args: list[PhpArg] = field(default_factory=list)

Ancestors

Instance variables

var args

The type of the None singleton.

var name

The type of the None singleton.

Inherited members

class PhpAttributeGroup (offset=-1, parent=None, leading_comments=<factory>, attributes=<factory>)

PhpAttributeGroup(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , attributes: 'list[PhpAttribute]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpAttributeGroup(Node):
    attributes: list[PhpAttribute] = field(default_factory=list)

Ancestors

Instance variables

var attributes

The type of the None singleton.

Inherited members

class PhpExpressionStatement (offset=-1, parent=None, leading_comments=<factory>, expression=None)

PhpExpressionStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expression: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpExpressionStatement(Statement):
    expression: Expression | None = None

Ancestors

Instance variables

var expression

The type of the None singleton.

Inherited members

class PhpInlineHTML (offset=-1, parent=None, leading_comments=<factory>, value='')

PhpInlineHTML(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpInlineHTML(Statement):
    value: str = ''

Ancestors

Instance variables

var value

The type of the None singleton.

Inherited members

class PhpEchoTagStatement (offset=-1, parent=None, leading_comments=<factory>, expressions=<factory>)

PhpEchoTagStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expressions: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpEchoTagStatement(Statement):
    expressions: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var expressions

The type of the None singleton.

Inherited members

class PhpEcho (offset=-1, parent=None, leading_comments=<factory>, expressions=<factory>)

PhpEcho(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , expressions: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpEcho(Statement):
    expressions: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var expressions

The type of the None singleton.

Inherited members

class PhpBlock (offset=-1, parent=None, leading_comments=<factory>, body=<factory>)

PhpBlock(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpBlock(Statement):
    body: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

Inherited members

class PhpIf (offset=-1, parent=None, leading_comments=<factory>, condition=None, consequent=<factory>, elseifs=<factory>, alternate=None, alternative_syntax=False)

PhpIf(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , condition: 'Expression | None' = None, consequent: 'list[Statement]' = , elseifs: 'list[PhpElseIf]' = , alternate: 'list[Statement] | None' = None, alternative_syntax: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpIf(Statement):
    condition: Expression | None = None
    consequent: list[Statement] = field(default_factory=list)
    elseifs: list[PhpElseIf] = field(default_factory=list)
    alternate: list[Statement] | None = None
    alternative_syntax: bool = False

Ancestors

Instance variables

var consequent

The type of the None singleton.

var elseifs

The type of the None singleton.

var condition

The type of the None singleton.

var alternate

The type of the None singleton.

var alternative_syntax

The type of the None singleton.

Inherited members

class PhpElseIf (offset=-1, parent=None, leading_comments=<factory>, condition=None, body=<factory>)

PhpElseIf(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , condition: 'Expression | None' = None, body: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpElseIf(Node):
    condition: Expression | None = None
    body: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

var condition

The type of the None singleton.

Inherited members

class PhpWhile (offset=-1, parent=None, leading_comments=<factory>, condition=None, body=<factory>, alternative_syntax=False)

PhpWhile(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , condition: 'Expression | None' = None, body: 'list[Statement]' = , alternative_syntax: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpWhile(Statement):
    condition: Expression | None = None
    body: list[Statement] = field(default_factory=list)
    alternative_syntax: bool = False

Ancestors

Instance variables

var body

The type of the None singleton.

var condition

The type of the None singleton.

var alternative_syntax

The type of the None singleton.

Inherited members

class PhpDoWhile (offset=-1, parent=None, leading_comments=<factory>, body=<factory>, condition=None)

PhpDoWhile(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[Statement]' = , condition: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpDoWhile(Statement):
    body: list[Statement] = field(default_factory=list)
    condition: Expression | None = None

Ancestors

Instance variables

var body

The type of the None singleton.

var condition

The type of the None singleton.

Inherited members

class PhpFor (offset=-1, parent=None, leading_comments=<factory>, init=<factory>, condition=<factory>, update=<factory>, body=<factory>, alternative_syntax=False)

PhpFor(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , init: 'list[Expression]' = , condition: 'list[Expression]' = , update: 'list[Expression]' = , body: 'list[Statement]' = , alternative_syntax: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpFor(Statement):
    init: list[Expression] = field(default_factory=list)
    condition: list[Expression] = field(default_factory=list)
    update: list[Expression] = field(default_factory=list)
    body: list[Statement] = field(default_factory=list)
    alternative_syntax: bool = False

Ancestors

Instance variables

var init

The type of the None singleton.

var condition

The type of the None singleton.

var update

The type of the None singleton.

var body

The type of the None singleton.

var alternative_syntax

The type of the None singleton.

Inherited members

class PhpForeach (offset=-1, parent=None, leading_comments=<factory>, subject=None, key=None, value=None, by_ref=False, body=<factory>, alternative_syntax=False)

PhpForeach(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , subject: 'Expression | None' = None, key: 'Expression | None' = None, value: 'Expression | None' = None, by_ref: 'bool' = False, body: 'list[Statement]' = , alternative_syntax: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpForeach(Statement):
    subject: Expression | None = None
    key: Expression | None = None
    value: Expression | None = None
    by_ref: bool = False
    body: list[Statement] = field(default_factory=list)
    alternative_syntax: bool = False

Ancestors

Instance variables

var body

The type of the None singleton.

var subject

The type of the None singleton.

var key

The type of the None singleton.

var value

The type of the None singleton.

var by_ref

The type of the None singleton.

var alternative_syntax

The type of the None singleton.

Inherited members

class PhpSwitch (offset=-1, parent=None, leading_comments=<factory>, subject=None, cases=<factory>, alternative_syntax=False)

PhpSwitch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , subject: 'Expression | None' = None, cases: 'list[PhpCase]' = , alternative_syntax: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpSwitch(Statement):
    subject: Expression | None = None
    cases: list[PhpCase] = field(default_factory=list)
    alternative_syntax: bool = False

Ancestors

Instance variables

var cases

The type of the None singleton.

var subject

The type of the None singleton.

var alternative_syntax

The type of the None singleton.

Inherited members

class PhpCase (offset=-1, parent=None, leading_comments=<factory>, test=None, body=<factory>)

PhpCase(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , test: 'Expression | None' = None, body: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpCase(Node):
    test: Expression | None = None
    body: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var body

The type of the None singleton.

var test

The type of the None singleton.

Inherited members

class PhpBreak (offset=-1, parent=None, leading_comments=<factory>, level=None)

PhpBreak(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , level: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpBreak(Statement):
    level: Expression | None = None

Ancestors

Instance variables

var level

The type of the None singleton.

Inherited members

class PhpContinue (offset=-1, parent=None, leading_comments=<factory>, level=None)

PhpContinue(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , level: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpContinue(Statement):
    level: Expression | None = None

Ancestors

Instance variables

var level

The type of the None singleton.

Inherited members

class PhpReturn (offset=-1, parent=None, leading_comments=<factory>, value=None)

PhpReturn(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , value: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpReturn(Statement):
    value: Expression | None = None

Ancestors

Instance variables

var value

The type of the None singleton.

Inherited members

class PhpGoto (offset=-1, parent=None, leading_comments=<factory>, label='')

PhpGoto(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , label: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpGoto(Statement):
    label: str = ''

Ancestors

Instance variables

var label

The type of the None singleton.

Inherited members

class PhpLabel (offset=-1, parent=None, leading_comments=<factory>, name='')

PhpLabel(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpLabel(Statement):
    name: str = ''

Ancestors

Instance variables

var name

The type of the None singleton.

Inherited members

class PhpThrowStatement (offset=-1, parent=None, leading_comments=<factory>, operand=None)

PhpThrowStatement(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , operand: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpThrowStatement(Statement):
    operand: Expression | None = None

Ancestors

Instance variables

var operand

The type of the None singleton.

Inherited members

class PhpTry (offset=-1, parent=None, leading_comments=<factory>, body=<factory>, catches=<factory>, finally_body=None)

PhpTry(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , body: 'list[Statement]' = , catches: 'list[PhpCatch]' = , finally_body: 'list[Statement] | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpTry(Statement):
    body: list[Statement] = field(default_factory=list)
    catches: list[PhpCatch] = field(default_factory=list)
    finally_body: list[Statement] | None = None

Ancestors

Instance variables

var body

The type of the None singleton.

var catches

The type of the None singleton.

var finally_body

The type of the None singleton.

Inherited members

class PhpCatch (offset=-1, parent=None, leading_comments=<factory>, types=<factory>, variable=None, body=<factory>)

PhpCatch(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , types: 'list[PhpName]' = , variable: 'PhpVariable | None' = None, body: 'list[Statement]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpCatch(Node):
    types: list[PhpName] = field(default_factory=list)
    variable: PhpVariable | None = None
    body: list[Statement] = field(default_factory=list)

Ancestors

Instance variables

var types

The type of the None singleton.

var body

The type of the None singleton.

var variable

The type of the None singleton.

Inherited members

class PhpUnset (offset=-1, parent=None, leading_comments=<factory>, variables=<factory>)

PhpUnset(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , variables: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpUnset(Statement):
    variables: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var variables

The type of the None singleton.

Inherited members

class PhpGlobal (offset=-1, parent=None, leading_comments=<factory>, variables=<factory>)

PhpGlobal(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , variables: 'list[Expression]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpGlobal(Statement):
    variables: list[Expression] = field(default_factory=list)

Ancestors

Instance variables

var variables

The type of the None singleton.

Inherited members

class PhpStaticVar (offset=-1, parent=None, leading_comments=<factory>, declarations=<factory>)

PhpStaticVar(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , declarations: 'list[PhpStaticVarDeclaration]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpStaticVar(Statement):
    declarations: list[PhpStaticVarDeclaration] = field(default_factory=list)

Ancestors

Instance variables

var declarations

The type of the None singleton.

Inherited members

class PhpStaticVarDeclaration (offset=-1, parent=None, leading_comments=<factory>, variable=None, default=None)

PhpStaticVarDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , variable: 'Expression | None' = None, default: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpStaticVarDeclaration(Node):
    variable: Expression | None = None
    default: Expression | None = None

Ancestors

Instance variables

var variable

The type of the None singleton.

var default

The type of the None singleton.

Inherited members

class PhpNop (offset=-1, parent=None, leading_comments=<factory>)

PhpNop(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpNop(Statement):
    pass

Ancestors

Inherited members

class PhpHaltCompiler (offset=-1, parent=None, leading_comments=<factory>, remainder='')

PhpHaltCompiler(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , remainder: 'str' = '')

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpHaltCompiler(Statement):
    remainder: str = ''

Ancestors

Instance variables

var remainder

The type of the None singleton.

Inherited members

class PhpFunctionDeclaration (offset=-1, parent=None, leading_comments=<factory>, name='', params=<factory>, return_type=None, body=None, by_ref=False, attributes=<factory>)

PhpFunctionDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', params: 'list[PhpParam]' = , return_type: 'Expression | None' = None, body: 'PhpBlock | None' = None, by_ref: 'bool' = False, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpFunctionDeclaration(Statement):
    name: str = ''
    params: list[PhpParam] = field(default_factory=list)
    return_type: Expression | None = None
    body: PhpBlock | None = None
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var params

The type of the None singleton.

var attributes

The type of the None singleton.

var name

The type of the None singleton.

var return_type

The type of the None singleton.

var body

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpClass (offset=-1, parent=None, leading_comments=<factory>, name='', kind=PhpClassKind.CLASS, extends=<factory>, implements=<factory>, members=<factory>, modifiers=<factory>, enum_backing_type=None, attributes=<factory>)

PhpClass(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', kind: 'PhpClassKind' = , extends: 'list[PhpName]' = , implements: 'list[PhpName]' = , members: 'list[Statement]' = , modifiers: 'list[str]' = , enum_backing_type: 'Expression | None' = None, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClass(Statement):
    name: str = ''
    kind: PhpClassKind = PhpClassKind.CLASS
    extends: list[PhpName] = field(default_factory=list)
    implements: list[PhpName] = field(default_factory=list)
    members: list[Statement] = field(default_factory=list)
    modifiers: list[str] = field(default_factory=list)
    enum_backing_type: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var extends

The type of the None singleton.

var implements

The type of the None singleton.

var members

The type of the None singleton.

var modifiers

The type of the None singleton.

var attributes

The type of the None singleton.

var name

The type of the None singleton.

var kind

The type of the None singleton.

var enum_backing_type

The type of the None singleton.

Inherited members

class PhpClassConst (offset=-1, parent=None, leading_comments=<factory>, consts=<factory>, modifiers=<factory>, type=None, attributes=<factory>)

PhpClassConst(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , consts: 'list[PhpConstDeclaration]' = , modifiers: 'list[str]' = , type: 'Expression | None' = None, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClassConst(Statement):
    consts: list[PhpConstDeclaration] = field(default_factory=list)
    modifiers: list[str] = field(default_factory=list)
    type: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var consts

The type of the None singleton.

var modifiers

The type of the None singleton.

var attributes

The type of the None singleton.

var type

The type of the None singleton.

Inherited members

class PhpConstDeclaration (offset=-1, parent=None, leading_comments=<factory>, name='', value=None)

PhpConstDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', value: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpConstDeclaration(Node):
    name: str = ''
    value: Expression | None = None

Ancestors

Instance variables

var name

The type of the None singleton.

var value

The type of the None singleton.

Inherited members

class PhpProperty (offset=-1, parent=None, leading_comments=<factory>, props=<factory>, modifiers=<factory>, type=None, attributes=<factory>)

PhpProperty(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , props: 'list[PhpPropertyDeclaration]' = , modifiers: 'list[str]' = , type: 'Expression | None' = None, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpProperty(Statement):
    props: list[PhpPropertyDeclaration] = field(default_factory=list)
    modifiers: list[str] = field(default_factory=list)
    type: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var props

The type of the None singleton.

var modifiers

The type of the None singleton.

var attributes

The type of the None singleton.

var type

The type of the None singleton.

Inherited members

class PhpPropertyDeclaration (offset=-1, parent=None, leading_comments=<factory>, variable=None, default=None)

PhpPropertyDeclaration(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , variable: 'PhpVariable | None' = None, default: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpPropertyDeclaration(Node):
    variable: PhpVariable | None = None
    default: Expression | None = None

Ancestors

Instance variables

var variable

The type of the None singleton.

var default

The type of the None singleton.

Inherited members

class PhpClassMethod (offset=-1, parent=None, leading_comments=<factory>, name='', params=<factory>, return_type=None, body=None, modifiers=<factory>, by_ref=False, attributes=<factory>)

PhpClassMethod(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', params: 'list[PhpParam]' = , return_type: 'Expression | None' = None, body: 'PhpBlock | None' = None, modifiers: 'list[str]' = , by_ref: 'bool' = False, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpClassMethod(Statement):
    name: str = ''
    params: list[PhpParam] = field(default_factory=list)
    return_type: Expression | None = None
    body: PhpBlock | None = None
    modifiers: list[str] = field(default_factory=list)
    by_ref: bool = False
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var params

The type of the None singleton.

var modifiers

The type of the None singleton.

var attributes

The type of the None singleton.

var name

The type of the None singleton.

var return_type

The type of the None singleton.

var body

The type of the None singleton.

var by_ref

The type of the None singleton.

Inherited members

class PhpEnumCase (offset=-1, parent=None, leading_comments=<factory>, name='', value=None, attributes=<factory>)

PhpEnumCase(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', value: 'Expression | None' = None, attributes: 'list[PhpAttributeGroup]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpEnumCase(Statement):
    name: str = ''
    value: Expression | None = None
    attributes: list[PhpAttributeGroup] = field(default_factory=list)

Ancestors

Instance variables

var attributes

The type of the None singleton.

var name

The type of the None singleton.

var value

The type of the None singleton.

Inherited members

class PhpTraitUse (offset=-1, parent=None, leading_comments=<factory>, traits=<factory>, adaptations=<factory>)

PhpTraitUse(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , traits: 'list[PhpName]' = , adaptations: 'list[PhpTraitAdaptation]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpTraitUse(Statement):
    traits: list[PhpName] = field(default_factory=list)
    adaptations: list[PhpTraitAdaptation] = field(default_factory=list)

Ancestors

Instance variables

var traits

The type of the None singleton.

var adaptations

The type of the None singleton.

Inherited members

class PhpTraitAdaptation (offset=-1, parent=None, leading_comments=<factory>, trait=None, method='', kind='alias', new_name=None, new_modifier=None, insteadof=<factory>)

PhpTraitAdaptation(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , trait: 'PhpName | None' = None, method: 'str' = '', kind: 'str' = 'alias', new_name: 'str | None' = None, new_modifier: 'str | None' = None, insteadof: 'list[PhpName]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpTraitAdaptation(Node):
    trait: PhpName | None = None
    method: str = ''
    kind: str = 'alias'
    new_name: str | None = None
    new_modifier: str | None = None
    insteadof: list[PhpName] = field(default_factory=list)

Ancestors

Instance variables

var insteadof

The type of the None singleton.

var trait

The type of the None singleton.

var method

The type of the None singleton.

var kind

The type of the None singleton.

var new_name

The type of the None singleton.

var new_modifier

The type of the None singleton.

Inherited members

class PhpNamespace (offset=-1, parent=None, leading_comments=<factory>, name=None, body=None)

PhpNamespace(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'PhpName | None' = None, body: 'list[Statement] | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpNamespace(Statement):
    name: PhpName | None = None
    body: list[Statement] | None = None

Ancestors

Instance variables

var name

The type of the None singleton.

var body

The type of the None singleton.

Inherited members

class PhpUse (offset=-1, parent=None, leading_comments=<factory>, uses=<factory>, kind=PhpUseKind.NORMAL)

PhpUse(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , uses: 'list[PhpUseItem]' = , kind: 'PhpUseKind' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpUse(Statement):
    uses: list[PhpUseItem] = field(default_factory=list)
    kind: PhpUseKind = PhpUseKind.NORMAL

Ancestors

Instance variables

var uses

The type of the None singleton.

var kind

The type of the None singleton.

Inherited members

class PhpUseItem (offset=-1, parent=None, leading_comments=<factory>, name=None, alias=None, kind=None)

PhpUseItem(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'PhpName | None' = None, alias: 'str | None' = None, kind: 'PhpUseKind | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpUseItem(Node):
    name: PhpName | None = None
    alias: str | None = None
    kind: PhpUseKind | None = None

Ancestors

Instance variables

var name

The type of the None singleton.

var alias

The type of the None singleton.

var kind

The type of the None singleton.

Inherited members

class PhpGroupUse (offset=-1, parent=None, leading_comments=<factory>, prefix=None, uses=<factory>, kind=PhpUseKind.NORMAL)

PhpGroupUse(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , prefix: 'PhpName | None' = None, uses: 'list[PhpUseItem]' = , kind: 'PhpUseKind' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpGroupUse(Statement):
    prefix: PhpName | None = None
    uses: list[PhpUseItem] = field(default_factory=list)
    kind: PhpUseKind = PhpUseKind.NORMAL

Ancestors

Instance variables

var uses

The type of the None singleton.

var prefix

The type of the None singleton.

var kind

The type of the None singleton.

Inherited members

class PhpConst (offset=-1, parent=None, leading_comments=<factory>, consts=<factory>)

PhpConst(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , consts: 'list[PhpConstDeclaration]' = )

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpConst(Statement):
    consts: list[PhpConstDeclaration] = field(default_factory=list)

Ancestors

Instance variables

var consts

The type of the None singleton.

Inherited members

class PhpDeclare (offset=-1, parent=None, leading_comments=<factory>, directives=<factory>, body=None, alternative_syntax=False)

PhpDeclare(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , directives: 'list[PhpDeclareDirective]' = , body: 'list[Statement] | None' = None, alternative_syntax: 'bool' = False)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpDeclare(Statement):
    directives: list[PhpDeclareDirective] = field(default_factory=list)
    body: list[Statement] | None = None
    alternative_syntax: bool = False

Ancestors

Instance variables

var directives

The type of the None singleton.

var body

The type of the None singleton.

var alternative_syntax

The type of the None singleton.

Inherited members

class PhpDeclareDirective (offset=-1, parent=None, leading_comments=<factory>, name='', value=None)

PhpDeclareDirective(offset: 'int' = -1, parent: 'Node | None' = None, leading_comments: 'list[str]' = , name: 'str' = '', value: 'Expression | None' = None)

Expand source code Browse git
@dataclass(repr=False, eq=False)
class PhpDeclareDirective(Node):
    name: str = ''
    value: Expression | None = None

Ancestors

Instance variables

var name

The type of the None singleton.

var value

The type of the None singleton.

Inherited members