[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

/framework/template/compiler/ -> expression.inc.php (summary)

(no description)

Version: $Id: expression.inc.php,v 1.29 2004/11/18 04:22:46 jeffmoore Exp $
File Size: 641 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 classes

expression:: (9 methods):
  expression()
  createvalue()
  createfilterchain()
  isconstant()
  getvalue()
  generateprestatement()
  generateexpression()
  generatepoststatement()
  prepare()

expressionvalueparser:: (5 methods):
  expressionvalueparser()
  acceptdatabinding()
  acceptinteger()
  acceptfloat()
  acceptstring()

expressionfilterfindingparser:: (3 methods):
  expressionfilterfindingparser()
  acceptfilter()
  addfilter()

expressionfilterparser:: (4 methods):
  expressionfilterparser()
  initargs()
  addarg()
  accept()


Class: expression  - X-Ref

Represents a single Expression found in the template. Responsibly for parsing
the expression and building a filter chain for the expression (if expression
contained filter syntax)

expression($expression, &$ComponentContext, $DefaultFilter = 'raw')   X-Ref

access: protected
param: string expression
param: object Compiler Component that attribute was found in
param: string (optional) default filter to apply

createvalue($expression, &$ComponentContext)   X-Ref
Parses an expression and returns an object representing the expression

access: private
param: string expression
param: object Compiler Component that attribute was found in
return: object ConstantProperty or DataBindingExpression

createfilterchain($expr, $Value, &$ComponentContext)   X-Ref
Parses an expression, building a chain of filters for it

access: private
param: string expression
param: object base filter to start with (CompilerFilter)
param: object Compiler Component that attribute was found in
return: object filter with chain of filters attached

isconstant()   X-Ref
Does this expression refer to a constant value (at compile time)?

access: public
return: Boolean

getvalue()   X-Ref
Return the value of this expression

access: public
return: String

generateprestatement(&$code)   X-Ref
Generate setup code for an expression reference

access: protected
param: CodeWriter
return: void

generateexpression(&$code)   X-Ref
Generate the code to read the data value at run time
Must generate only a valid PHP Expression.

access: protected
param: CodeWriter
return: void

generatepoststatement(&$code)   X-Ref
Generate tear down code for an expression reference

access: protected
param: CodeWriter
return: void

prepare()   X-Ref
Calls the prepare method on the root of the filter chain

access: protected
return: void

Class: expressionvalueparser  - X-Ref

Searches expression strings for constant values
WARNING: this parser defaults to data binding expressions. That means if it
doest recognise a integer, float or string constant, what it calls a data binding
expression may not in fact be a data binding expression. It assumes that
Expression::createValue asks it a parse a valid value string

expressionvalueparser($expression)   X-Ref
Invokes the Lexer to parse the expression

param: string expression to parse

acceptdatabinding($expression,$state)   X-Ref
Lexer callback - accepts the default data binding
expression - called if no constants found

access: private
param: string parsed expression
param: int expression lexer state
return: boolean TRUE

acceptinteger($int,$state)   X-Ref
Lexer callback - called for integer constants

access: private
param: string matched integer
param: int expression lexer state
return: boolean TRUE

acceptfloat($float,$state)   X-Ref
Lexer callback - called for float constants

access: private
param: string matched float
param: int expression lexer state
return: boolean TRUE

acceptstring($string,$state)   X-Ref
Lexer callback - called for string constants

access: private
param: string matched string
param: int expression lexer state
return: boolean TRUE

Class: expressionfilterfindingparser  - X-Ref

expressionfilterfindingparser($expression)   X-Ref
No description

acceptfilter($filter,$state)   X-Ref
Lexer callback - called for value strings

access: private
param: string
param: int expression lexer state
return: boolean TRUE

addfilter()   X-Ref
Lexer callback - called every time a filter delimiter
is found. Populates the Values array with the current
value

access: private
return: boolean TRUE

Class: expressionfilterparser  - X-Ref

expressionfilterparser($expression)   X-Ref
No description

initargs()   X-Ref
Lexer callback - if the : delimiter is found, prepares the Args array

access: private
return: boolean TRUE

addarg()   X-Ref
Lexer callback - if the , delimiter is found, adds the current arg
to the Args array

access: private
return: boolean TRUE

accept($expression,$state)   X-Ref
Lexer callback - accepts a single argument

access: private
param: string
param: int expression lexer state
return: boolean TRUE



Generated: Sun Nov 28 19:36:09 2004 Cross-referenced by PHPXref 0.5