Overview

Namespaces

  • LightnCandy

Classes

  • Compiler
  • Context
  • Encoder
  • Exporter
  • Expression
  • Flags
  • LightnCandy
  • Parser
  • Partial
  • Runtime
  • SafeString
  • StringObject
  • Token
  • Validator
  • Overview
  • Namespace
  • Class

Class Token

LightnCandy Token handler

Direct known subclasses

LightnCandy\Parser
Namespace: LightnCandy
Located at Token.php
Methods summary
public static
# setDelimiter( array<string,array|string|integer> & $context, string|null $left = null, string|null $right = null )

Setup delimiter by default or provided string

Setup delimiter by default or provided string

Parameters

$context
Current context
$left
left string of a token
$right
right string of a token
public static string
# toString( string[] $token, string[]|null $merge = null )

return token string

return token string

Parameters

$token
detected handlebars {{ }} token
$merge
list of token strings to be merged

Returns

string
Return whole token

Expect

'c' when input array(0, 'a', 'b', 'c', 'd', 'e')
'cd' when input array(0, 'a', 'b', 'c', 'd', 'e', 'f')
'qd' when input array(0, 'a', 'b', 'c', 'd', 'e', 'f'), array(3 => 'q')
Constants summary
string VARNAME_SEARCH
# '/(\\[[^\\]]+\\]|[^\\[\\]\\.]+)/'
integer POS_LOTHER
# 1
integer POS_LSPACE
# 2
integer POS_BEGINTAG
# 3
integer POS_LSPACECTL
# 4
integer POS_BEGINRAW
# 5
integer POS_OP
# 6
integer POS_INNERTAG
# 7
integer POS_ENDRAW
# 8
integer POS_RSPACECTL
# 9
integer POS_ENDTAG
# 10
integer POS_RSPACE
# 11
integer POS_ROTHER
# 12
integer POS_BACKFILL
# 13
API documentation generated by ApiGen