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

Breadcrumb

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

function TokenIterator::getContentBetween

File

vendor/phpstan/phpdoc-parser/src/Parser/TokenIterator.php, line 53

Class

TokenIterator

Namespace

PHPStan\PhpDocParser\Parser

Code

public function getContentBetween(int $startPos, int $endPos) : string {
    if ($startPos < 0 || $endPos > count($this->tokens)) {
        throw new LogicException();
    }
    $content = '';
    for ($i = $startPos; $i < $endPos; $i++) {
        $content .= $this->tokens[$i][Lexer::VALUE_OFFSET];
    }
    return $content;
}

API Navigation

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