[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/pattemplate/patTemplate/ -> Compiler.php (summary)

Compiler for patTemplate $Id: Compiler.php 10381 2008-06-01 03:35:53Z pasamio $

Author: Stephan Schmidt <schst@php.net>
File Size: 485 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

patTemplate_Compiler:: (13 methods):
  patTemplate_Compiler()
  compile()
  compileTemplate()
  _compileStandardTemplate()
  _compileModuloTemplate()
  _compileSimpleConditionTemplate()
  _compileConditionTemplate()
  _compileBuiltinConditions()
  _templateToPHP()
  displayParsedTemplate()
  _addToCode()
  _getVar()
  _prepareCompiledTemplate()


Class: patTemplate_Compiler  - X-Ref

Compiler for patTemplate

$Id: Compiler.php 10381 2008-06-01 03:35:53Z pasamio $

WARNING: This is still experimental!

patTemplate_Compiler( $type = 'html' )   X-Ref
constructor

Creates a new patTemplate Compiler

param: string        type of the templates, either 'html' or 'tex'

compile( $compileName = null )   X-Ref
compile the currently loaded templates

param: string    name of the input (filename, shm segment, etc.)

compileTemplate( $template )   X-Ref
compile a template

param: string    name of the template

_compileStandardTemplate( $template )   X-Ref
compile a standard template

param: string        name of the template

_compileModuloTemplate( $template )   X-Ref
compile a modulo template

A modulo template will be compiled into a switch/case
statement.

param: string        name of the template

_compileSimpleConditionTemplate( $template )   X-Ref
compile a simpleCondition template

A simpleCondition template will be compiled into an 'if'
statement.

param: string        name of the template

_compileConditionTemplate( $template )   X-Ref
compile a condition template

A condition template will be compiled into an 'switch/case'
statement.

param: string        name of the template

_compileBuiltinConditions( $template )   X-Ref
compile built-in conditions

This will create the neccessary PHP code for:
- __first
- __last

param: string    template name

_templateToPHP( $content, $template )   X-Ref
build PHP code from a template

This will replace the variables in a template with
PHP Code.

param: string        template content
param: string        name of the template
return: string        PHP code

displayParsedTemplate( $name = null )   X-Ref
display the compiled template

This is a replacement for patTemplate::displayParsedTemplate.

param: string        name of the template to display

_addToCode( $line, $indent = 0, $comment = null )   X-Ref
add a line to the compiled code

param: string        line to add
param: integer        indentation
return: void

_getVar( $template, $varname )   X-Ref
function, used by the compiler to get a value of a variable

Checks, whether the value is locally or globally set

param: string        template
param: string        variable name

_prepareCompiledTemplate( $template )   X-Ref
prepare a template for the compiler

param: string        template name



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1