cvs: pear /Template Template.php
| From: | Paul Jones | Date: | Mon, 14 Jun 2004 03:18:56 +0000 |
| Subject: | cvs: pear /Template Template.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-20617@lists.php.net to get a copy of this message | ||
pmjones Sun Jun 13 23:18:56 2004 EDT
Modified files:
/pear/Template Template.php
Log:
moved examples in header to wiki.ciaweb.net documentation site, minor CS tweaks, lots of
commenting updates, not touching the code itself (except for a couple of trailing commas in arrays)
until further communication with Alan.
http://cvs.php.net/diff.php/pear/Template/Template.php?r1=1.1&r2=1.2&ty=u Index: pear/Template/Template.php diff -u pear/Template/Template.php:1.1 pear/Template/Template.php:1.2 --- pear/Template/Template.php:1.1 Sun Jun 13 10:08:09 2004 +++ pear/Template/Template.php Sun Jun 13 23:18:56 2004 @@ -1,233 +1,200 @@ <?php -/* - ------------------------------- -the dumbest usage a php code template..: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) -)); -$x->open('mytemplate.php'); -$x->setData('xxx','yyy'); -$x->output(); - ------------------------------- - -dumbest usage Flexy/Tokenizer Mode: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -$x->open('mytemplate.html'); -$x->outputData($this); - ------------------------------- -mix and match: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -$x->open('mytemplate.html'); -$x->setData('xxx','yyy'); -$x->output(); - - ------------------------------- -flexy with element object.: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -$x->open('mytemplate.html'); -$x->outputData(array('object'=>&$this, 'elements'=>$elements))); - ------------------------------- -WACT with element object.: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -//??? need some thought.. -$x->data['elements'] = $x->getElement('formentry'); -$x->data['elements']->setSomething('xxxx'); -$x->outputData(array('object'=>&$this, 'elements'=>$elements))); - ------------------------------- -IT/Sigma type -$x = new Template(array( - 'template_dir' =>dirname(__FILE__) - 'complier' =>'block', - 'block.caching' => true, - 'compile_dir' => '/tmp/templateCache', -); - -$x->setData('xxx','yyy'); -$x->block('set','block1'); -$x->setData('xxx','yyy'); -$x->setData('xxx','yyy'); -$x->block('parse'); - -$x->block('file', array('new_block'=>'example_3.html')); -foreach ($something as $a=>$b) { - $x->setData('xxx','yyy'); - $x->block('parse','new_block') -} - - -$x->output(); - -------------------------------------------------------------------------------------------- -The Theory goes the options array that you use with the constructor could have 100's of -potential options. --- less than 6 defaults should be essentail for it's normal operation --- For most common usage: between 1 - 3 options are set in the constructor... +/** +* Error code: syntax error in template. +*/ +define('TEMPLATE_ERROR_SYNTAX', -1); -Other than the standard ones in the engine.. -This should list the all the options, along with where to find descriptions of them. - 'locale' @see Template_MultiSource / Template_Compiler_* - 'source.allow_multiple' @see Template_MultiSource - 'source.sort_order' - 'source.type' - 'compiler.folder' @see Template_Compiler - 'compiler.force' - 'compiler.regex.filters' @see Template_Compiler_Regex - 'compiler.standard.non_HTML' @see Template_Compiler_Flexy - 'compiler.standard.allow_PHP' - 'compiler.standard.element_parsing' - 'compiler.standard.compile_to_String' - 'compiler.standard.privates' - 'compiler.standard.globals' - 'compiler.standard.globalfunctions' - 'compiler.standard.translation2' - 'plugins.date_format' - 'plugins.img_rewrite' - - +/** +* Error code: bad arguments to methods. */ +define('TEMPLATE_ERROR_INVALIDARGS', -2); -// ERRORS: +/** +* Error code: file access problem +*/ +define('TEMPLATE_ERROR_FILE', -3); -define('TEMPLATE_ERROR_SYNTAX', -1); // syntax error in template. -define('TEMPLATE_ERROR_INVALIDARGS', -2); // bad arguments to methods. -define('TEMPLATE_ERROR_FILE', -3); // file access problem +/** +* Error code: RETURN ERRORS +*/ +define('TEMPLATE_ERROR_RETURN', 1); +/** +* Error code: FATAL DEATH +*/ +define('TEMPLATE_ERROR_DIE', 8); -define('TEMPLATE_ERROR_RETURN', 1); // RETURN ERRORS -define('TEMPLATE_ERROR_DIE', 8); // FATAL DEATH /** -* Universal Template Provider +* +* This class implements a "universal" template provider for PEAR. * -* Example to be added.. +* See example usage and in-progress documentation at {@link +* http://wiki.ciaweb.net/yawiki/index.php?area=Template} +* +* $Id: Template.php,v 1.2 2004/06/14 03:18:56 pmjones Exp $ +* +* @package Template * +* @author Philippe Jausions <Philippe.Jausions@11abacus.com> +* +* @author Alan Knowles <alan@akbkhome.com> +* +* @author Paul M. Jones <pmjones@ciaweb.net> +* */ -class Template -{ - /* - * @var array $options the options for initializing the template class +class Template { + + + /** + * + * The options for initializing the template class. + * + * The options available in the base implementation are: + * + * 'template_dir' => string|array, where are your templates (can be + * an array, or a list seperatated by the system PATH_SEPARATOR) + * + * 'compiler' => string, which compiler to use (e.g., 'Flexy', + * 'Regex', '' (Raw), Xipe, Smarty, WACT, Block (ITX/Sigma/phplib) + * + * 'debug' => boolean, whether or not to print debug messages + * + * 'output.strict' => boolean, whether or not sll elements in the + * template must be defined - makes php E_NOTICE warnings appear when + * outputing template. + * + * 'errors.behaviour' => (note the British spelling!) a + * TEMPLATE_ERROR_* constant. + * + * 'plugins' => load classes to be made available via the plugin + * method eg. = array('Savant') - loads the Savant methods. = + * array('MyClass_Plugins' => 'MyClass/Plugins.php') Class, and where + * to include it from.. + * + * @access public + * + * @var array + * */ + var $options = array( - - - - // where the template comes from. ------------------------------------------ - 'template_dir' => '', // where are your templates = can be an array, or - // a list seperatated by the system PATH_SEPERATOR - 'compiler' => '', // which compiler to use. - // Flexy, Regex, '' (Raw), Xipe, - // Smarty, WACT, Block (ITX/Sigma/phplib) - - 'debug' => false, // prints a few messages - - - 'output.strict' => false, // All elements in the template must be defined - - // makes php E_NOTICE warnings appear when outputing template. - - 'errors.behaviour' => TEMPLATE_ERROR_DIE, - // default behavior is to die on errors in template. - // - - 'plugins' => array(), - // load classes to be made available via the plugin method - // eg. = array('Savant') - loads the Savant methods. - // = array('MyClass_Plugins' => 'MyClass/Plugins.php') - // Class, and where to include it from.. - ); + 'template_dir' => '', + 'compiler' => '', + 'debug' => false, + 'output.strict' => false, + 'errors.behaviour' => TEMPLATE_ERROR_DIE, + 'plugins' => array(), + ); + + /** - * The compiled template filename (Full path) + * + * ??? * - * @var string * @access public + * + * @var string + * */ + var $files = array( 'currentTemplate' => '', 'gettextStringsFile' => '', 'elementsFile' => '', ); - + + /** - * Array of various data stored in engine. * - * @var array of + * Array of various data portions stored in engine. + * + * 'variables' => Data assigned to the template by copy. + * + * 'byref' => Data assigned to the template by reference. + * + * 'elements' => ??? + * + * 'object' => ??? + * + * 'elements_original' => ??? + * + * @var array + * * @access private + * */ + var $data = array( 'variables' => array(), 'byref' => array(), 'elements' => array(), 'object' => false, - 'elements_original' => false, + 'elements_original' => false ); + /** + * * Array of feature providers * - * @var array of Template_* * @access private + * + * @var array + * */ + var $provider = array( 'Assign' => null, // assign API 'Plugin' => null, // plugins 'Block' => null, // IT type templates - 'Multisource' => null, // where is the file? + 'Multisource' => null // where is the file? ); + /** - * Constructor - * - * Initializes the Template engine, and sets up behaviour based on the provided options * - * @access public - * @param array $options (Optional) + * Constructor. + * + * Initializes the Template engine, and sets up behaviour based on + * the provided options. + * + * @access public + * + * @param array $options An array of options to pass to the Template + * object; see the $options property. + * */ function Template( $options=array() ) { - - $this->options = array_merge($this->options, $options); - // option manipulation goes here! - dont do to much of it... - // the providers should do their own option manipulation if necessary when they - // are loaded.. - + // option manipulation goes here! - dont do to much of it... the + // providers should do their own option manipulation if + // necessary when they are loaded.. + $this->options['template_dir'] = is_string($this->options['template_dir']) ? explode(PATH_SEPARATOR,$this->options['template_dir'] ) : $this->options['template_dir']; - - - } - - - + + /** - * open (and optionally parse or compile a template ) - * - * @access public - * @param string $file relative to the 'template_dir' which you set when calling the constructor - * @return boolean true on success. (or string, if compiler.toString) PEAR_Error on failure.. + * + * Open and optionally parse or compile a template. + * + * @access public + * + * @param string $file The file path of the template source, relative + * to the 'template_dir' option set in the constructor. + * + * @return mixed Boolean true on success (or string, if + * 'compiler.toString' is set), or PEAR_Error on failure. + * */ + function open( $file ) { @@ -285,19 +252,20 @@ } } - + + /** - * Outputs the template.. + * + * Outputs the template. + * + * @access public + * + * @return void * - * @access public - * @return none */ function output() { - - - $this->debug( "output {$this->files['compliedTemplate']}"); if ($this->options['compiler'] == 'block') { @@ -305,15 +273,14 @@ return; } - // some compilers will set element merge + // some compilers will set element merge. // takes what was in the template and overlays it with - // the contents of $this->data['elements'] + // the contents of $this->data['elements']. // this may end up being moved into the head code - // of the compiled template (just like the $t mapping.. - + // of the compiled template (just like the $t mapping). if (isset($this->options['output.element_merge'])) { - // loads elements into data['elementsOriginal'] + // loads elements into $this->data['elementsOriginal'] if ($this->getElement()) { // elements' loaded preumably... as we have some! HTML_Template_Element::mergeAllElements($this); @@ -368,16 +335,21 @@ error_reporting($_error_reporting); } } + + /** - * get the result of the template overlayed with data as a string. * - * @access public - * @param object object to output as $t - * @return string - result + * Gets the result of the template overlaid with data as a string. + * + * @access public + * + * @param object The object to output as $t + * + * @return string - result + * */ function toString() { - { ob_start(); if (is_a($r = $this->output(), 'PEAR_Error'))) { ob_end_clean(); @@ -387,17 +359,22 @@ ob_end_clean(); return $data; } - + + /** - * if debugging is on, print the debug info to the screen * - * @access public - * @param string $string output to display - * @return none + * Prints the debug info to the screen if debugging is on. + * + * @access public + * + * @param string $string Debug message to display. + * + * @return void + * */ + function debug($string) { - if (!$this->options['debug']) { return; } @@ -411,23 +388,32 @@ /** + * * Lazy loading of PEAR, and the error handler.. + * * This should load Templae_Error really.. (where all the mapping of error stuff can go..) * - * @param string message - * @param int error type. - * @param int an equivalant to pear error return|die etc. - * @param array args for printf view of message... + * @access public + * + * @param string $mesage The error message text. * - * @return object pear error. - * @access public + * @param int $type Error type. + * + * @param int $severity An equivalent to PEAR_ERROR_[RETURN|DIE|etc] + * + * @param array $args Args for printf view of message. + * + * @return object PEAR_Error object. + * */ - function raiseError($message, $type = null, $severity = TEMPLATE_ERROR_RETURN ,$args = array()) + + function raiseError($message, $type = null, $severity = TEMPLATE_ERROR_RETURN, + $args = array()) { - $this->debug("<B>TEMPLATE::raiseError</B>$message"); $this->assertProvider('Error'); - return $this->provider['Error']->raiseError($message,$type,$severity,$args); + return $this->provider['Error']->raiseError($message, $type, $severity, + $args); } @@ -445,6 +431,7 @@ * @see TEMPLATE_Assign::setData() * @status alpha */ + function setData() { $this->assertProvider('Assign') return $this->provider['Assign']>setData(func_get_args());
http://cvs.php.net/diff.php/pear/Template/Template.php?r1=1.1&r2=1.2&ty=u Index: pear/Template/Template.php diff -u pear/Template/Template.php:1.1 pear/Template/Template.php:1.2 --- pear/Template/Template.php:1.1 Sun Jun 13 10:08:09 2004 +++ pear/Template/Template.php Sun Jun 13 23:18:56 2004 @@ -1,233 +1,200 @@ <?php -/* - ------------------------------- -the dumbest usage a php code template..: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) -)); -$x->open('mytemplate.php'); -$x->setData('xxx','yyy'); -$x->output(); - ------------------------------- - -dumbest usage Flexy/Tokenizer Mode: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -$x->open('mytemplate.html'); -$x->outputData($this); - ------------------------------- -mix and match: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -$x->open('mytemplate.html'); -$x->setData('xxx','yyy'); -$x->output(); - - ------------------------------- -flexy with element object.: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -$x->open('mytemplate.html'); -$x->outputData(array('object'=>&$this, 'elements'=>$elements))); - ------------------------------- -WACT with element object.: -$x = new Template(array( - 'template_dir'=>dirname(__FILE__) - 'complier'=>'Standard', -); -//??? need some thought.. -$x->data['elements'] = $x->getElement('formentry'); -$x->data['elements']->setSomething('xxxx'); -$x->outputData(array('object'=>&$this, 'elements'=>$elements))); - ------------------------------- -IT/Sigma type -$x = new Template(array( - 'template_dir' =>dirname(__FILE__) - 'complier' =>'block', - 'block.caching' => true, - 'compile_dir' => '/tmp/templateCache', -); - -$x->setData('xxx','yyy'); -$x->block('set','block1'); -$x->setData('xxx','yyy'); -$x->setData('xxx','yyy'); -$x->block('parse'); - -$x->block('file', array('new_block'=>'example_3.html')); -foreach ($something as $a=>$b) { - $x->setData('xxx','yyy'); - $x->block('parse','new_block') -} - - -$x->output(); - -------------------------------------------------------------------------------------------- -The Theory goes the options array that you use with the constructor could have 100's of -potential options. --- less than 6 defaults should be essentail for it's normal operation --- For most common usage: between 1 - 3 options are set in the constructor... +/** +* Error code: syntax error in template. +*/ +define('TEMPLATE_ERROR_SYNTAX', -1); -Other than the standard ones in the engine.. -This should list the all the options, along with where to find descriptions of them. - 'locale' @see Template_MultiSource / Template_Compiler_* - 'source.allow_multiple' @see Template_MultiSource - 'source.sort_order' - 'source.type' - 'compiler.folder' @see Template_Compiler - 'compiler.force' - 'compiler.regex.filters' @see Template_Compiler_Regex - 'compiler.standard.non_HTML' @see Template_Compiler_Flexy - 'compiler.standard.allow_PHP' - 'compiler.standard.element_parsing' - 'compiler.standard.compile_to_String' - 'compiler.standard.privates' - 'compiler.standard.globals' - 'compiler.standard.globalfunctions' - 'compiler.standard.translation2' - 'plugins.date_format' - 'plugins.img_rewrite' - - +/** +* Error code: bad arguments to methods. */ +define('TEMPLATE_ERROR_INVALIDARGS', -2); -// ERRORS: +/** +* Error code: file access problem +*/ +define('TEMPLATE_ERROR_FILE', -3); -define('TEMPLATE_ERROR_SYNTAX', -1); // syntax error in template. -define('TEMPLATE_ERROR_INVALIDARGS', -2); // bad arguments to methods. -define('TEMPLATE_ERROR_FILE', -3); // file access problem +/** +* Error code: RETURN ERRORS +*/ +define('TEMPLATE_ERROR_RETURN', 1); +/** +* Error code: FATAL DEATH +*/ +define('TEMPLATE_ERROR_DIE', 8); -define('TEMPLATE_ERROR_RETURN', 1); // RETURN ERRORS -define('TEMPLATE_ERROR_DIE', 8); // FATAL DEATH /** -* Universal Template Provider +* +* This class implements a "universal" template provider for PEAR. * -* Example to be added.. +* See example usage and in-progress documentation at {@link +* http://wiki.ciaweb.net/yawiki/index.php?area=Template} +* +* $Id: Template.php,v 1.2 2004/06/14 03:18:56 pmjones Exp $ +* +* @package Template * +* @author Philippe Jausions <Philippe.Jausions@11abacus.com> +* +* @author Alan Knowles <alan@akbkhome.com> +* +* @author Paul M. Jones <pmjones@ciaweb.net> +* */ -class Template -{ - /* - * @var array $options the options for initializing the template class +class Template { + + + /** + * + * The options for initializing the template class. + * + * The options available in the base implementation are: + * + * 'template_dir' => string|array, where are your templates (can be + * an array, or a list seperatated by the system PATH_SEPARATOR) + * + * 'compiler' => string, which compiler to use (e.g., 'Flexy', + * 'Regex', '' (Raw), Xipe, Smarty, WACT, Block (ITX/Sigma/phplib) + * + * 'debug' => boolean, whether or not to print debug messages + * + * 'output.strict' => boolean, whether or not sll elements in the + * template must be defined - makes php E_NOTICE warnings appear when + * outputing template. + * + * 'errors.behaviour' => (note the British spelling!) a + * TEMPLATE_ERROR_* constant. + * + * 'plugins' => load classes to be made available via the plugin + * method eg. = array('Savant') - loads the Savant methods. = + * array('MyClass_Plugins' => 'MyClass/Plugins.php') Class, and where + * to include it from.. + * + * @access public + * + * @var array + * */ + var $options = array( - - - - // where the template comes from. ------------------------------------------ - 'template_dir' => '', // where are your templates = can be an array, or - // a list seperatated by the system PATH_SEPERATOR - 'compiler' => '', // which compiler to use. - // Flexy, Regex, '' (Raw), Xipe, - // Smarty, WACT, Block (ITX/Sigma/phplib) - - 'debug' => false, // prints a few messages - - - 'output.strict' => false, // All elements in the template must be defined - - // makes php E_NOTICE warnings appear when outputing template. - - 'errors.behaviour' => TEMPLATE_ERROR_DIE, - // default behavior is to die on errors in template. - // - - 'plugins' => array(), - // load classes to be made available via the plugin method - // eg. = array('Savant') - loads the Savant methods. - // = array('MyClass_Plugins' => 'MyClass/Plugins.php') - // Class, and where to include it from.. - ); + 'template_dir' => '', + 'compiler' => '', + 'debug' => false, + 'output.strict' => false, + 'errors.behaviour' => TEMPLATE_ERROR_DIE, + 'plugins' => array(), + ); + + /** - * The compiled template filename (Full path) + * + * ??? * - * @var string * @access public + * + * @var string + * */ + var $files = array( 'currentTemplate' => '', 'gettextStringsFile' => '', 'elementsFile' => '', ); - + + /** - * Array of various data stored in engine. * - * @var array of + * Array of various data portions stored in engine. + * + * 'variables' => Data assigned to the template by copy. + * + * 'byref' => Data assigned to the template by reference. + * + * 'elements' => ??? + * + * 'object' => ??? + * + * 'elements_original' => ??? + * + * @var array + * * @access private + * */ + var $data = array( 'variables' => array(), 'byref' => array(), 'elements' => array(), 'object' => false, - 'elements_original' => false, + 'elements_original' => false ); + /** + * * Array of feature providers * - * @var array of Template_* * @access private + * + * @var array + * */ + var $provider = array( 'Assign' => null, // assign API 'Plugin' => null, // plugins 'Block' => null, // IT type templates - 'Multisource' => null, // where is the file? + 'Multisource' => null // where is the file? ); + /** - * Constructor - * - * Initializes the Template engine, and sets up behaviour based on the provided options * - * @access public - * @param array $options (Optional) + * Constructor. + * + * Initializes the Template engine, and sets up behaviour based on + * the provided options. + * + * @access public + * + * @param array $options An array of options to pass to the Template + * object; see the $options property. + * */ function Template( $options=array() ) { - - $this->options = array_merge($this->options, $options); - // option manipulation goes here! - dont do to much of it... - // the providers should do their own option manipulation if necessary when they - // are loaded.. - + // option manipulation goes here! - dont do to much of it... the + // providers should do their own option manipulation if + // necessary when they are loaded.. + $this->options['template_dir'] = is_string($this->options['template_dir']) ? explode(PATH_SEPARATOR,$this->options['template_dir'] ) : $this->options['template_dir']; - - - } - - - + + /** - * open (and optionally parse or compile a template ) - * - * @access public - * @param string $file relative to the 'template_dir' which you set when calling the constructor - * @return boolean true on success. (or string, if compiler.toString) PEAR_Error on failure.. + * + * Open and optionally parse or compile a template. + * + * @access public + * + * @param string $file The file path of the template source, relative + * to the 'template_dir' option set in the constructor. + * + * @return mixed Boolean true on success (or string, if + * 'compiler.toString' is set), or PEAR_Error on failure. + * */ + function open( $file ) { @@ -285,19 +252,20 @@ } } - + + /** - * Outputs the template.. + * + * Outputs the template. + * + * @access public + * + * @return void * - * @access public - * @return none */ function output() { - - - $this->debug( "output {$this->files['compliedTemplate']}"); if ($this->options['compiler'] == 'block') { @@ -305,15 +273,14 @@ return; } - // some compilers will set element merge + // some compilers will set element merge. // takes what was in the template and overlays it with - // the contents of $this->data['elements'] + // the contents of $this->data['elements']. // this may end up being moved into the head code - // of the compiled template (just like the $t mapping.. - + // of the compiled template (just like the $t mapping). if (isset($this->options['output.element_merge'])) { - // loads elements into data['elementsOriginal'] + // loads elements into $this->data['elementsOriginal'] if ($this->getElement()) { // elements' loaded preumably... as we have some! HTML_Template_Element::mergeAllElements($this); @@ -368,16 +335,21 @@ error_reporting($_error_reporting); } } + + /** - * get the result of the template overlayed with data as a string. * - * @access public - * @param object object to output as $t - * @return string - result + * Gets the result of the template overlaid with data as a string. + * + * @access public + * + * @param object The object to output as $t + * + * @return string - result + * */ function toString() { - { ob_start(); if (is_a($r = $this->output(), 'PEAR_Error'))) { ob_end_clean(); @@ -387,17 +359,22 @@ ob_end_clean(); return $data; } - + + /** - * if debugging is on, print the debug info to the screen * - * @access public - * @param string $string output to display - * @return none + * Prints the debug info to the screen if debugging is on. + * + * @access public + * + * @param string $string Debug message to display. + * + * @return void + * */ + function debug($string) { - if (!$this->options['debug']) { return; } @@ -411,23 +388,32 @@ /** + * * Lazy loading of PEAR, and the error handler.. + * * This should load Templae_Error really.. (where all the mapping of error stuff can go..) * - * @param string message - * @param int error type. - * @param int an equivalant to pear error return|die etc. - * @param array args for printf view of message... + * @access public + * + * @param string $mesage The error message text. * - * @return object pear error. - * @access public + * @param int $type Error type. + * + * @param int $severity An equivalent to PEAR_ERROR_[RETURN|DIE|etc] + * + * @param array $args Args for printf view of message. + * + * @return object PEAR_Error object. + * */ - function raiseError($message, $type = null, $severity = TEMPLATE_ERROR_RETURN ,$args = array()) + + function raiseError($message, $type = null, $severity = TEMPLATE_ERROR_RETURN, + $args = array()) { - $this->debug("<B>TEMPLATE::raiseError</B>$message"); $this->assertProvider('Error'); - return $this->provider['Error']->raiseError($message,$type,$severity,$args); + return $this->provider['Error']->raiseError($message, $type, $severity, + $args); } @@ -445,6 +431,7 @@ * @see TEMPLATE_Assign::setData() * @status alpha */ + function setData() { $this->assertProvider('Assign') return $this->provider['Assign']>setData(func_get_args());