\ManaPHP\Html\Renderer\Engine\SwordCompiler

Summary

Methods
Properties
Constants
getInstance()
getShared()
inject()
__get()
__set()
__isset()
attachEvent()
detachEvent()
peekEvent()
fireEvent()
on()
off()
emit()
__debugInfo()
dump()
toArray()
jsonSerialize()
__construct()
compileString()
compileFile()
directive()
$url
$router
$alias
$eventsManager
$logger
$configure
$settings
$crypt
$identity
$cache
$httpClient
$restClient
$db
$redisCache
$redisDb
$redisBroker
$mongodb
$rabbitmq
$elasticsearch
$mailer
$bosClient
$wspClient
$coroutineManager
$wsClient
$pubSub
$_context
$_di
No constants found
_createContext()
_addFileHash()
_completeRelativeLinks()
_completeLinks()
_compileComments()
_compileEchos()
_getEchoMethods()
_compileStatements()
_compileRawEchos()
_compileEscapedEchos()
_isSafeEchos()
_compileEchoDefaults()
_compile_yield()
_compile_section()
_compile_append()
_compile_endSection()
_compile_stop()
_compile_else()
_compile_for()
_compile_foreach()
_compile_foreachElse()
_compile_can()
_compile_allow()
_compile_cannot()
_compile_if()
_compile_elseif()
_compile_while()
_compile_endWhile()
_compile_endFor()
_compile_endForeach()
_compile_endCan()
_compile_endCannot()
_compile_endIf()
_compile_include()
_compile_partial()
_compile_block()
_compile_break()
_compile_continue()
_compile_maxAge()
_compile_layout()
_compile_content()
_compile_php()
_compile_endPhp()
_compile_widget()
_compile_url()
_compile_asset()
_compile_flash()
_compile_json()
_compile_debugger()
_compile_eol()
_compile_date()
_compile_action()
_compile_use()
_compile_html()
_compile_css()
_compile_endcss()
_compile_js()
_compile_endjs()
$_object_id
$_on
$_injections
$_hash_length
$_directives
$_rawTags
$_escapedTags
$_foreachelse_used
$_safe_functions
N/A
No private methods found
No private properties found
N/A

Properties

$url

$url : \ManaPHP\Http\UrlInterface

Type

\ManaPHP\Http\UrlInterface

$router

$router : \ManaPHP\Http\RouterInterface

Type

\ManaPHP\Http\RouterInterface

$alias

$alias : \ManaPHP\AliasInterface

Type

\ManaPHP\AliasInterface

$eventsManager

$eventsManager : \ManaPHP\Event\ManagerInterface

Type

\ManaPHP\Event\ManagerInterface

$logger

$logger : \ManaPHP\Logging\LoggerInterface

Type

\ManaPHP\Logging\LoggerInterface

$configure

$configure : \ManaPHP\Configuration\Configure

Type

\ManaPHP\Configuration\Configure

$settings

$settings : \ManaPHP\Configuration\SettingsInterface

Type

\ManaPHP\Configuration\SettingsInterface

$crypt

$crypt : \ManaPHP\Security\CryptInterface

Type

\ManaPHP\Security\CryptInterface

$identity

$identity : \ManaPHP\IdentityInterface

Type

\ManaPHP\IdentityInterface

$cache

$cache : \ManaPHP\Caching\CacheInterface

Type

\ManaPHP\Caching\CacheInterface

$httpClient

$httpClient : \ManaPHP\Http\ClientInterface

Type

\ManaPHP\Http\ClientInterface

$restClient

$restClient : \ManaPHP\Http\ClientInterface

Type

\ManaPHP\Http\ClientInterface

$db

$db : \ManaPHP\Data\DbInterface

Type

\ManaPHP\Data\DbInterface

$redisCache

$redisCache : \Redis|\ManaPHP\Data\RedisInterface

Type

\Redis|\ManaPHP\Data\RedisInterface

$redisDb

$redisDb : \Redis|\ManaPHP\Data\RedisInterface

Type

\Redis|\ManaPHP\Data\RedisInterface

$redisBroker

$redisBroker : \Redis|\ManaPHP\Data\RedisInterface

Type

\Redis|\ManaPHP\Data\RedisInterface

$mongodb

$mongodb : \ManaPHP\Data\MongodbInterface

Type

\ManaPHP\Data\MongodbInterface

$rabbitmq

$rabbitmq : \ManaPHP\Messaging\AmqpInterface

Type

\ManaPHP\Messaging\AmqpInterface

$elasticsearch

$elasticsearch : \Elasticsearch\Client

Type

\Elasticsearch\Client

$mailer

$mailer : \ManaPHP\Mailing\MailerInterface

Type

\ManaPHP\Mailing\MailerInterface

$bosClient

$bosClient : \ManaPHP\Bos\ClientInterface

Type

\ManaPHP\Bos\ClientInterface

$wspClient

$wspClient : \ManaPHP\Ws\Pushing\ClientInterface

Type

\ManaPHP\Ws\Pushing\ClientInterface

$coroutineManager

$coroutineManager : \ManaPHP\Coroutine\ManagerInterface

Type

\ManaPHP\Coroutine\ManagerInterface

$wsClient

$wsClient : \ManaPHP\Ws\ClientInterface

Type

\ManaPHP\Ws\ClientInterface

$pubSub

$pubSub : \ManaPHP\Messaging\PubSubInterface

Type

\ManaPHP\Messaging\PubSubInterface

$_context

$_context : \object

Type

\object

$_di

$_di : \ManaPHP\DiInterface

Type

\ManaPHP\DiInterface

$_object_id

$_object_id : integer

Type

integer

$_on

$_on : array<mixed,callable>

Type

array<mixed,callable>

$_injections

$_injections : array

Type

array

$_hash_length

$_hash_length : integer

Type

integer

$_directives

$_directives : array

All custom "directive" handlers.

Type

array

$_rawTags

$_rawTags : array

Array of opening and closing tags for raw echos.

Type

array

$_escapedTags

$_escapedTags : array

Array of opening and closing tags for escaped echos.

Type

array

$_foreachelse_used

$_foreachelse_used : boolean

Type

boolean

$_safe_functions

$_safe_functions : array

Type

array

Methods

getInstance()

getInstance(string  $class, array  $params = array()) : mixed

Parameters

string $class
array $params

Returns

mixed

getShared()

getShared(string  $name) : mixed

Parameters

string $name

Returns

mixed

inject()

inject(string  $name, mixed  $target) : static

Parameters

string $name
mixed $target

Returns

static

__get()

__get(string  $name) : mixed

Magic method __get

Parameters

string $name

Returns

mixed

__set()

__set(string  $name, mixed  $value) : void

Parameters

string $name
mixed $value

__isset()

__isset(string  $name) : boolean

Parameters

string $name

Returns

boolean

attachEvent()

attachEvent(string  $event, callable  $handler, boolean  $appended = true) : static

Attach a listener to the events manager

Parameters

string $event
callable $handler
boolean $appended

Returns

static

detachEvent()

detachEvent(string  $event, callable  $handler) : static

Parameters

string $event
callable $handler

Returns

static

peekEvent()

peekEvent(string  $group, callable  $handler) : static

Parameters

string $group
callable $handler

Returns

static

fireEvent()

fireEvent(string  $event, mixed  $data = array(), mixed  $source = null) : void

Fires an event in the events manager causing that the active listeners will be notified about it

Parameters

string $event
mixed $data
mixed $source

on()

on(string  $event, callable  $handler) : static

Parameters

string $event
callable $handler

Returns

static

off()

off(string  $event = null, callable  $handler = null) : static

Parameters

string $event
callable $handler

Returns

static

emit()

emit(string  $event, array  $data = array()) : void

Parameters

string $event
array $data

__debugInfo()

__debugInfo() : array

Returns

array

dump()

dump() : array

Returns

array

toArray()

toArray() : array

Returns

array

jsonSerialize()

jsonSerialize() 

__construct()

__construct(array  $options = array()) 

Parameters

array $options

compileString()

compileString(string  $value) : string

Compile the given Sword template contents.

Parameters

string $value

Returns

string

compileFile()

compileFile(string  $source, string  $compiled) : static

Parameters

string $source
string $compiled

Returns

static

directive()

directive(string  $name, callable  $handler) : static

Register a handler for custom directives.

Parameters

string $name
callable $handler

Returns

static

_createContext()

_createContext() : object

Returns

object

_addFileHash()

_addFileHash(string  $str) : string

Parameters

string $str

Returns

string

_completeRelativeLinks()

_completeRelativeLinks(string  $file, string  $str) : string

Parameters

string $file
string $str

Returns

string

_completeLinks()

_completeLinks(string  $file, string  $str) : string

Parameters

string $file
string $str

Returns

string

_compileComments()

_compileComments(string  $value) : string

Compile Sword comments into valid PHP.

Parameters

string $value

Returns

string

_compileEchos()

_compileEchos(string  $value) : string

Compile Sword echos into valid PHP.

Parameters

string $value

Returns

string

_getEchoMethods()

_getEchoMethods() : array

Get the echo methods in the proper order for compilation.

Returns

array

_compileStatements()

_compileStatements(string  $value) : mixed

Compile Sword statements that start with "@".

Parameters

string $value

Returns

mixed

_compileRawEchos()

_compileRawEchos(string  $value) : string

Compile the "raw" echo statements.

Parameters

string $value

Returns

string

_compileEscapedEchos()

_compileEscapedEchos(string  $value) : string

Compile the escaped echo statements.

Parameters

string $value

Returns

string

_isSafeEchos()

_isSafeEchos(string  $value) : boolean

Parameters

string $value

Returns

boolean

_compileEchoDefaults()

_compileEchoDefaults(string  $value) : string

Compile the default values for the echo statement.

Parameters

string $value

Returns

string

_compile_yield()

_compile_yield(string  $expression) : string

Compile the yield statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_section()

_compile_section(string  $expression) : string

Compile the section statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_append()

_compile_append(string  $expression) : string

Compile the append statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endSection()

_compile_endSection(string  $expression) : string

Compile the end-section statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_stop()

_compile_stop(string  $expression) : string

Compile the stop statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_else()

_compile_else(string  $expression) : string

Compile the else statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_for()

_compile_for(string  $expression) : string

Compile the for statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_foreach()

_compile_foreach(string  $expression) : string

Compile the foreach statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_foreachElse()

_compile_foreachElse() : string

Compile the foreachelse statements into valid PHP.

Returns

string

_compile_can()

_compile_can(string  $expression) : string

Compile the can statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_allow()

_compile_allow(string  $expression) : string

Compile the allow statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_cannot()

_compile_cannot(string  $expression) : string

Compile the cannot statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_if()

_compile_if(string  $expression) : string

Compile the if statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_elseif()

_compile_elseif(string  $expression) : string

Compile the else-if statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_while()

_compile_while(string  $expression) : string

Compile the while statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endWhile()

_compile_endWhile(string  $expression) : string

Compile the end-while statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endFor()

_compile_endFor(string  $expression) : string

Compile the end-for statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endForeach()

_compile_endForeach(string  $expression) : string

Compile the end-for-each statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endCan()

_compile_endCan(string  $expression) : string

Compile the end-can statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endCannot()

_compile_endCannot(string  $expression) : string

Compile the end-cannot statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endIf()

_compile_endIf(string  $expression) : string

Compile the end-if statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_include()

_compile_include(string  $expression) : string

Compile the include statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_partial()

_compile_partial(string  $expression) : string

Compile the partial statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_block()

_compile_block(string  $expression) : string

Compile the block statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_break()

_compile_break(string  $expression) : string

Compile the break statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_continue()

_compile_continue(string  $expression) : string

Compile the break statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_maxAge()

_compile_maxAge(string  $expression) : string

Compile the maxAge statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_layout()

_compile_layout(string  $expression) : string

Compile the break statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_content()

_compile_content(string  $expression) : string

Compile the break statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_php()

_compile_php(string  $expression) : string

Compile the break statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_endPhp()

_compile_endPhp(string  $expression) : string

Compile the break statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_widget()

_compile_widget(string  $expression) : string

Compile the widget statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_url()

_compile_url(string  $expression) : string

Compile the Url statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_asset()

_compile_asset(string  $expression) : string

Compile the Asset statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_flash()

_compile_flash(string  $expression) : string

Compile the flash statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_json()

_compile_json(string  $expression) : string

Compile the json statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_debugger()

_compile_debugger(string  $expression) : string

Compile the json statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_eol()

_compile_eol(string  $expression) : string

Compile the eol statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_date()

_compile_date(string  $expression) : string

Compile the eol statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_action()

_compile_action(string  $expression) : string

Compile the action statements into valid PHP.

Parameters

string $expression

Returns

string

_compile_use()

_compile_use(string  $expression) : string

Parameters

string $expression

Returns

string

_compile_html()

_compile_html(string  $expression) : string

Parameters

string $expression

Returns

string

_compile_css()

_compile_css() : string

Returns

string

_compile_endcss()

_compile_endcss() : string

Returns

string

_compile_js()

_compile_js() : string

Returns

string

_compile_endjs()

_compile_endjs() : string

Returns

string