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

Breadcrumb

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

class TryCatch

Hierarchy

  • class \PhpParser\Node\Stmt\TryCatch extends \Node\Stmt

Expanded class hierarchy of TryCatch

1 file declares its use of TryCatch
ParserAbstract.php in vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php

File

vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php, line 7

Namespace

PhpParser\Node\Stmt
View source
class TryCatch extends Node\Stmt {
    
    /** @var Node\Stmt[] Statements */
    public array $stmts;
    
    /** @var Catch_[] Catches */
    public array $catches;
    
    /** @var null|Finally_ Optional finally node */
    public ?Finally_ $finally;
    
    /**
     * Constructs a try catch node.
     *
     * @param Node\Stmt[] $stmts Statements
     * @param Catch_[] $catches Catches
     * @param null|Finally_ $finally Optional finally node
     * @param array<string, mixed> $attributes Additional attributes
     */
    public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) {
        $this->attributes = $attributes;
        $this->stmts = $stmts;
        $this->catches = $catches;
        $this->finally = $finally;
    }
    public function getSubNodeNames() : array {
        return [
            'stmts',
            'catches',
            'finally',
        ];
    }
    public function getType() : string {
        return 'Stmt_TryCatch';
    }

}

Members

Title Sort descending Modifiers Object type Summary
TryCatch::$catches public property @var Catch_[] Catches
TryCatch::$finally public property @var null|Finally_ Optional finally node
TryCatch::$stmts public property @var Node\Stmt[] Statements
TryCatch::getSubNodeNames public function
TryCatch::getType public function
TryCatch::__construct public function Constructs a try catch node.

API Navigation

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