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

Breadcrumb

  1. Drupal Core 11.1.x

Token.php

Same filename in this branch
  1. 11.1.x vendor/theseer/tokenizer/src/Token.php
  2. 11.1.x vendor/doctrine/lexer/src/Token.php
  3. 11.1.x vendor/twig/twig/src/Token.php
  4. 11.1.x vendor/symfony/css-selector/Parser/Token.php
  5. 11.1.x vendor/mck89/peast/lib/Peast/Syntax/Token.php
  6. 11.1.x core/lib/Drupal/Core/Render/Element/Token.php
  7. 11.1.x core/lib/Drupal/Core/Utility/Token.php

Namespace

PhpParser

File

vendor/nikic/php-parser/lib/PhpParser/Token.php

View source
<?php

declare (strict_types=1);
namespace PhpParser;


/**
 * A PHP token. On PHP 8.0 this extends from PhpToken.
 */
class Token extends Internal\TokenPolyfill {
    
    /** Get (exclusive) zero-based end position of the token. */
    public function getEndPos() : int {
        return $this->pos + \strlen($this->text);
    }
    
    /** Get 1-based end line number of the token. */
    public function getEndLine() : int {
        return $this->line + \substr_count($this->text, "\n");
    }

}

Classes

Title Deprecated Summary
Token A PHP token. On PHP 8.0 this extends from PhpToken.

API Navigation

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