[ Index ] |
PHP Cross Reference of Web Application Component Toolkit |
[Source view] [Print]
(no description)
Version: | $Id: compilercomponent.inc.php,v 1.45 2004/11/15 21:51:45 jeffmoore Exp $ |
File Size: | 656 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
compilercomponent:: (36 methods):
registerwrapper()
addchildattribute()
setattribute()
getattribute()
hasattribute()
getboolattribute()
removeattribute()
getattributesasarray()
generateattributelist()
generatedynamicattributelist()
registerproperty()
getproperty()
getclientid()
getserverid()
addchild()
removechild()
getlastchild()
findchild()
findchildbyclass()
findchildrenbyclass()
findimmediatechildbyclass()
findparentbyclass()
prepare()
checknestinglevel()
preparse()
isdatasource()
getdatasource()
getparentdatasource()
getrootdatasource()
getdatasourcerefcode()
getcomponentrefcode()
generateconstructor()
generatecontents()
pregenerate()
postgenerate()
generate()
Class: compilercomponent - X-Ref
Base class for compile time components. Compile time component methods areregisterwrapper(&$wrapper) X-Ref |
Set a wrapping component for this component access: protected param: object return: void |
addchildattribute(&$child) X-Ref |
Sets the XML attributes for this component (as extracted from the template) access: protected param: object XML attributes return: void |
setattribute($attrib, $value) X-Ref |
Sets an attribute access: public param: string name of attribute param: string value of attribute return: void |
getattribute($attrib) X-Ref |
Returns the value of an XML attribute (as extracted from template) or NULL if attribute not found access: public param: string attribute name return: mixed string attribute value or null |
hasattribute($attrib) X-Ref |
Check to see whether a named attribute exists access: public param: string name of attribute return: boolean |
getboolattribute($attrib, $default = FALSE) X-Ref |
Return the value of a boolean attribute as a boolean. ATTRIBUTE=ANYTHING (true) ATTRIBUTE=(FALSE|N|NA|NO|NONE|0) (false) ATTRIBUTE (true) (attribute unspecified) (default) access: public param: string attribute name param: boolean value to return if attribute is not found return: boolean |
removeattribute($attrib) X-Ref |
Remove an attribute from the list access: public param: string name of attribute return: void |
getattributesasarray($suppress = array() X-Ref |
Returns an array containing the attributes of this component that can be resolved at compile time. access: protected return: array representation of attributes |
generateattributelist(&$code, $suppress = array() X-Ref |
No description |
generatedynamicattributelist(&$code, $suppress = array() X-Ref |
No description |
registerproperty($name, &$property) X-Ref |
register a property with this component. Currently, this component must be a database to support properties. This may change. access: public |
getproperty($name) X-Ref |
access: public return: CompilerProperty returns the named property or NULL if it doesn't exist |
getclientid() X-Ref |
Get the value of the XML id attribute access: protected return: string value of id attribute |
getserverid() X-Ref |
Returns the identifying server ID. It's value it determined in the following order; <ol> <li>The XML id attribute in the template if it exists</li> <li>The value of $this->ServerId</li> <li>An ID generated by the getNewServerId() function</li> </ol> access: protected return: string value identifying this component |
addchild(&$child) X-Ref |
Adds a child component, by reference, to the array of children access: protected param: object instance of a compile time component return: void |
removechild($ServerId) X-Ref |
Removes a child component, given it's ServerID access: protected param: string server id return: mixed if child is found, returns a reference to it or void |
getlastchild() X-Ref |
Returns the last child added to a component access: protected return: mixed last child instance or false if no children |
findchild($ServerId) X-Ref |
Returns a child component, given it's ServerID access: protected param: string server id return: mixed if child is found, returns a reference of false |
findchildbyclass($class) X-Ref |
Returns a child component, given it's compile time component class access: protected param: string PHP class name return: mixed if child is found, returns a reference of false |
findchildrenbyclass($class) X-Ref |
Returns an array of child components, given it's compile time component class access: protected param: string PHP class name return: array |
findimmediatechildbyclass($class) X-Ref |
Returns a child component, given it's compile time component class access: protected param: string PHP class name return: mixed if child is found, returns a reference of false |
findparentbyclass($class) X-Ref |
Returns a parent component, recursively searching parents by their compile time component class name access: protected param: string PHP class name return: mixed if parent is found, returns a reference of void |
prepare() X-Ref |
No description |
checknestinglevel() X-Ref |
Used to perform some error checking on the source template, such as examining the tag hierarchy and triggering an error if a tag is incorrectly nested. Concrete implementation is in subclasses access: protected return: void |
preparse() X-Ref |
Provides instruction to the template parser, while parsing is in progress, telling it how it should handle the tag. Subclasses of CompilerComponent will return different instructions.<br /> Available instructions are; <ul> <li>PARSER_REQUIRE_PARSING - default in this class. Tag must be parsed</li> <li>PARSER_FORBID_PARSING - Tag may not be parsed</li> <li>PARSER_ALLOW_PARSING - Tag may can be parsed</li> </ul> In practice, the parser currently only pays attention to the PARSER_FORBID_PARSING instruction.<br /> Also used to perform error checking on template related to the syntax of the concrete tag implementing this method. access: protected return: int PARSER_REQUIRE_PARSING |
isdatasource() X-Ref |
return: Boolean Indicating whether or not this component is a DataSource |
getdatasource() X-Ref |
If a parent compile time component exists, returns the value of the parent's getDataSource() method, which will be a concrete implementation access: protected return: mixed object compile time component if parent exists or void |
getparentdatasource() X-Ref |
Gets the parent in the DataSource, if one exists access: protected return: mixed object compile time data component if exists or void |
getrootdatasource() X-Ref |
Gets a root DataSource access: protected return: mixed object compile time data component if exists or void |
getdatasourcerefcode() X-Ref |
Gets the DataSource reference code of the parent access: protected return: string |
getcomponentrefcode() X-Ref |
Gets the component reference code of the parent. This is a PHP string which is used in the compiled template to reference the component in the hierarchy at runtime access: protected return: string |
generateconstructor(&$code) X-Ref |
Calls the generateConstructor() method of each child component access: protected param: CodeWriter return: void |
generatecontents(&$code) X-Ref |
Calls the generate() method of each child component access: protected param: CodeWriter return: void |
pregenerate(&$code) X-Ref |
Pre generation method, calls the WrappingComponents generateWrapperPrefix() method if the component exists access: protected param: CodeWriter return: void |
postgenerate(&$code) X-Ref |
Post generation method, calls the WrappingComponents generateWrapperPostfix() method if the component exists access: protected param: CodeWriter return: void |
generate(&$code) X-Ref |
Calls the local preGenerate(), generateContents() and postGenerate() methods. access: protected param: CodeWriter return: void |
Generated: Sun Nov 28 19:36:09 2004 | Cross-referenced by PHPXref 0.5 |