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

Breadcrumb

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

function CommentsRegistry::__construct

Class constructor

Parameters

Parser $parser Parser:

File

vendor/mck89/peast/lib/Peast/Syntax/CommentsRegistry.php, line 59

Class

CommentsRegistry
Comments registry class. Internal class used to manage comments

Namespace

Peast\Syntax

Code

public function __construct(Parser $parser) {
    $parser->getEventsEmitter()
        ->addListener("NodeCompleted", array(
        $this,
        "onNodeCompleted",
    ))
        ->addListener("EndParsing", array(
        $this,
        "onEndParsing",
    ));
    $parser->getScanner()
        ->getEventsEmitter()
        ->addListener("TokenConsumed", array(
        $this,
        "onTokenConsumed",
    ))
        ->addListener("EndReached", array(
        $this,
        "onTokenConsumed",
    ))
        ->addListener("FreezeState", array(
        $this,
        "onScannerFreezeState",
    ))
        ->addListener("ResetState", array(
        $this,
        "onScannerResetState",
    ));
}

API Navigation

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