PHP Класс Habari\HiEngineParser

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$contexts
$file
$filename
$position
$strings

Открытые методы

Метод Описание
apply_parameters ( array $returnval, array $params ) : string Take the found paramters on a variable tag and apply them to the output
hi_command ( array $matches ) : string Replace a single function template tag with its PHP counterpart
hi_if ( array $matches ) : string Replace an if tag section with its PHP counterpart
hi_loop ( array $matches ) : string Replace a loop tag section with its PHP counterpart, and add the context to the stack
hi_quote ( array $matches ) Prepare strings for translation
hi_to_var ( $hisyntax )
hi_var ( array $matches ) : string Replace a single template tag with its PHP counterpart
process ( string $template ) : string Process the template file for template tags
stream_eof ( ) : boolean Report whether the stream is at the end of the file
stream_open ( string $path, string $mode, integer $options, string &$opened_path ) : boolean Open a HiEngineParser stream
stream_read ( integer $count ) : string Read data from a HiEngineParser stream
stream_seek ( integer $offset, integer $whence ) : boolean Seek to a specific position within the stream
stream_stat ( ) : array Return fstat() info as required when calling stats on the stream
stream_tell ( ) : integer Report the position in the stream
stream_write ( string $data ) : boolean Srite data to a HiEngineParser stream
string_stack ( array $matches ) Creates a table of static strings in hiengine expressions to be replaced in later
var_replace ( array $matches ) Replace variables in the hiengine syntax with PHP varaibles

Описание методов

apply_parameters() публичный Метод

Take the found paramters on a variable tag and apply them to the output
public apply_parameters ( array $returnval, array $params ) : string
$returnval array The expression to be output
$params array An associative array of parameters
Результат string The PHP expression with the paramters applied

hi_command() публичный Метод

Replace a single function template tag with its PHP counterpart
public hi_command ( array $matches ) : string
$matches array The match array found in HiEngineParser::process()
Результат string The PHP replacement for the function template tag

hi_if() публичный Метод

Replace an if tag section with its PHP counterpart
public hi_if ( array $matches ) : string
$matches array The match array found in HiEngineParser::process()
Результат string The PHP replacement for the template tag

hi_loop() публичный Метод

Replace a loop tag section with its PHP counterpart, and add the context to the stack
public hi_loop ( array $matches ) : string
$matches array The match array found in HiEngineParser::process()
Результат string The PHP replacement for the template tag

hi_quote() публичный Метод

Prepare strings for translation
public hi_quote ( array $matches )
$matches array Matches in HiEngineParser::process()

hi_to_var() публичный Метод

public hi_to_var ( $hisyntax )

hi_var() публичный Метод

Replace a single template tag with its PHP counterpart
public hi_var ( array $matches ) : string
$matches array The match array found in HiEngineParser::process()
Результат string The PHP replacement for the template tag

process() публичный Метод

Process the template file for template tags
public process ( string $template ) : string
$template string The template file contents
Результат string The processed template

stream_eof() публичный Метод

Report whether the stream is at the end of the file
public stream_eof ( ) : boolean
Результат boolean true if the file pointer is at or beyond the end of the file

stream_open() публичный Метод

Open a HiEngineParser stream
public stream_open ( string $path, string $mode, integer $options, string &$opened_path ) : boolean
$path string Path of the opened resource, including the protocol specifier
$mode string Mode used to open the file
$options integer Bitmask options for opening this stream
$opened_path string The actual path opened if using relative path, by reference
Результат boolean true on success

stream_read() публичный Метод

Read data from a HiEngineParser stream
public stream_read ( integer $count ) : string
$count integer Number of characters to read from the current position
Результат string Characters read from the stream

stream_seek() публичный Метод

Seek to a specific position within the stream
public stream_seek ( integer $offset, integer $whence ) : boolean
$offset integer The offset from the specified position
$whence integer The position to seek from
Результат boolean true if seek was successful

stream_stat() публичный Метод

Return fstat() info as required when calling stats on the stream
public stream_stat ( ) : array
Результат array An array of stat info

stream_tell() публичный Метод

Report the position in the stream
public stream_tell ( ) : integer
Результат integer the position in the stream

stream_write() публичный Метод

Srite data to a HiEngineParser stream
public stream_write ( string $data ) : boolean
$data string Data to write
Результат boolean false, since this stream type is read-only

string_stack() публичный Метод

Creates a table of static strings in hiengine expressions to be replaced in later
public string_stack ( array $matches )
$matches array The match found in hi_if ()

var_replace() публичный Метод

Replace variables in the hiengine syntax with PHP varaibles
public var_replace ( array $matches )
$matches array The match array found in hi_if ()

Описание свойств

$contexts защищенное свойство

protected $contexts

$file защищенное свойство

protected $file

$filename защищенное свойство

protected $filename

$position защищенное свойство

protected $position

$strings защищенное свойство

protected $strings