Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • ArrayHash
  • ArrayList
  • Arrays
  • Callback
  • DateTime
  • FileSystem
  • Finder
  • Html
  • Image
  • Json
  • LimitedScope
  • MimeTypeDetector
  • ObjectMixin
  • Paginator
  • Random
  • Strings
  • TokenIterator
  • Tokenizer
  • Validators

Interfaces

  • IHtmlString

Exceptions

  • AssertionException
  • JsonException
  • RegexpException
  • TokenizerException
  • UnknownImageFileException
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage

Class Tokenizer

Simple lexical analyser.

Namespace: Nette\Utils
Located at Tokenizer/Tokenizer.php
Methods summary
public
# __construct( array $patterns, string $flags = '' )

Parameters

$patterns
array
of [(int|string) token type => (string) pattern]
$flags
string
regular expression flags
public array
# tokenize( string $input )

Tokenizes string.

Tokenizes string.

Parameters

$input
string

Returns

array

Throws

Nette\Utils\TokenizerException
public static array
# getCoordinates( string $text, integer $offset )

Returns position of token in input string.

Returns position of token in input string.

Parameters

$text
string
$offset
integer

Returns

array
of [line, column]
Constants summary
integer VALUE 0
#
integer OFFSET 1
#
integer TYPE 2
#
Nette 2.2 API documentation generated by ApiGen 2.8.0