Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Expression.php

class Expression

Same name in this branch
  1. 11.1.x vendor/symfony/validator/Constraints/Expression.php \Symfony\Component\Validator\Constraints\Expression
  2. 11.1.x vendor/phpdocumentor/type-resolver/src/Types/Expression.php \phpDocumentor\Reflection\Types\Expression

Represents statements of type "expr;"

Hierarchy

  • class \PhpParser\Node\Stmt\Expression extends \Node\Stmt

Expanded class hierarchy of Expression

35 string references to 'Expression'
ArrayExpression::setElements in vendor/mck89/peast/lib/Peast/Syntax/Node/ArrayExpression.php
Sets array elements
ArrowFunctionExpression::setBody in vendor/mck89/peast/lib/Peast/Syntax/Node/ArrowFunctionExpression.php
Sets the function body
AssignmentExpression::setLeft in vendor/mck89/peast/lib/Peast/Syntax/Node/AssignmentExpression.php
Sets the left node of the assignment
BinaryExpression::setLeft in vendor/mck89/peast/lib/Peast/Syntax/Node/BinaryExpression.php
Sets the left expression
CallExpression::setArguments in vendor/mck89/peast/lib/Peast/Syntax/Node/CallExpression.php
Sets the arguments array

... See full list

File

vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php, line 10

Namespace

PhpParser\Node\Stmt
View source
class Expression extends Node\Stmt {
    
    /** @var Node\Expr Expression */
    public Node\Expr $expr;
    
    /**
     * Constructs an expression statement.
     *
     * @param Node\Expr $expr Expression
     * @param array<string, mixed> $attributes Additional attributes
     */
    public function __construct(Node\Expr $expr, array $attributes = []) {
        $this->attributes = $attributes;
        $this->expr = $expr;
    }
    public function getSubNodeNames() : array {
        return [
            'expr',
        ];
    }
    public function getType() : string {
        return 'Stmt_Expression';
    }

}

Members

Title Sort descending Modifiers Object type Summary
Expression::$expr public property @var Node\Expr Expression
Expression::getSubNodeNames public function
Expression::getType public function
Expression::__construct public function Constructs an expression statement.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal