Public Member Functions | Protected Attributes

HiEngineParser Class Reference

List of all members.

Public Member Functions

 stream_open ($path, $mode, $options, &$opened_path)
 stream_read ($count)
 stream_write ($data)
 stream_tell ()
 stream_eof ()
 stream_seek ($offset, $whence)
 stream_stat ()
 process ($template)
 hi_command ($matches)
 hi_var ($matches)
 apply_parameters ($returnval, $params)
 hi_loop ($matches)
 var_replace ($matches)
 hi_to_var ($hisyntax)
 string_stack ($matches)
 hi_if ($matches)
 hi_quote ($matches)

Protected Attributes

 $file
 $filename
 $position
 $contexts
 $strings = array()

Detailed Description

HiEngineParser - A stream filtering class for the HiEngine

Definition at line 63 of file hiengine.php.


Member Function Documentation

HiEngineParser::apply_parameters ( returnval,
params 
)

Take the found paramters on a variable tag and apply them to the output

Parameters:
array $returnval The expression to be output
array $params An associative array of parameters
Returns:
string The PHP expression with the paramters applied

Definition at line 316 of file hiengine.php.

HiEngineParser::hi_command ( matches  ) 

Replace a single function template tag with its PHP counterpart

Parameters:
array $matches The match array found in HiEngineParser::process()
Returns:
string The PHP replacement for the function template tag

Definition at line 218 of file hiengine.php.

HiEngineParser::hi_if ( matches  ) 

Replace an if tag section with its PHP counterpart

Parameters:
array $matches The match array found in HiEngineParser::process()
Returns:
string The PHP replacement for the template tag

Definition at line 413 of file hiengine.php.

HiEngineParser::hi_loop ( matches  ) 

Replace a loop tag section with its PHP counterpart, and add the context to the stack

Parameters:
array $matches The match array found in HiEngineParser::process()
Returns:
string The PHP replacement for the template tag

Definition at line 337 of file hiengine.php.

HiEngineParser::hi_quote ( matches  ) 

Prepare strings for translation

Parameters:
array $matches Matches in HiEngineParser::process()
string The PHP replacement for the template tag

Definition at line 435 of file hiengine.php.

HiEngineParser::hi_var ( matches  ) 

Replace a single template tag with its PHP counterpart

Parameters:
array $matches The match array found in HiEngineParser::process()
Returns:
string The PHP replacement for the template tag

Definition at line 260 of file hiengine.php.

HiEngineParser::process ( template  ) 

Process the template file for template tags

Parameters:
string $template The template file contents
Returns:
string The processed template

Definition at line 202 of file hiengine.php.

Referenced by hi_if(), hi_loop(), and stream_open().

HiEngineParser::stream_eof (  ) 

Report whether the stream is at the end of the file

Returns:
boolean true if the file pointer is at or beyond the end of the file

Definition at line 136 of file hiengine.php.

Referenced by stream_read().

HiEngineParser::stream_open ( path,
mode,
options,
&$  opened_path 
)

Open a HiEngineParser stream

Parameters:
string $path Path of the opened resource, including the protocol specifier
string $mode Mode used to open the file
integer $options Bitmask options for opening this stream
string $opened_path The actual path opened if using relative path, by reference
Returns:
boolean true on success

Definition at line 80 of file hiengine.php.

HiEngineParser::stream_read ( count  ) 

Read data from a HiEngineParser stream

Parameters:
integer $count Number of characters to read from the current position
Returns:
string Characters read from the stream

Definition at line 99 of file hiengine.php.

HiEngineParser::stream_seek ( offset,
whence 
)

Seek to a specific position within the stream

Parameters:
integer $offset The offset from the specified position
integer $whence The position to seek from
Returns:
boolean true if seek was successful

Definition at line 148 of file hiengine.php.

HiEngineParser::stream_stat (  ) 

Return fstat() info as required when calling stats on the stream

Returns:
array An array of stat info

Definition at line 191 of file hiengine.php.

HiEngineParser::stream_tell (  ) 

Report the position in the stream

Returns:
integer the position in the stream

Definition at line 126 of file hiengine.php.

HiEngineParser::stream_write ( data  ) 

Srite data to a HiEngineParser stream

Parameters:
string $data Data to write
Returns:
boolean false, since this stream type is read-only

Definition at line 115 of file hiengine.php.

HiEngineParser::string_stack ( matches  ) 

Creates a table of static strings in hiengine expressions to be replaced in later

Parameters:
array $matches The match found in hi_if ()
Returns:
string An uncommon string index for the stored static string.

Definition at line 400 of file hiengine.php.

HiEngineParser::var_replace ( matches  ) 

Replace variables in the hiengine syntax with PHP varaibles

Parameters:
array $matches The match array found in hi_if ()
Returns:
string A PHP variable string to use as the replacement

Definition at line 355 of file hiengine.php.


The documentation for this class was generated from the following file: