Date: 09/22/00
- Next message: uw: "[phplib-dev] cvs commit"
- Previous message: Jeff Stuart: "[phplib-dev] How stable is PHPLib-Dev"
- Next in thread: Ulf Wendel: "Re: [phplib-dev] RFC: Changes to template.inc"
- Reply: Ulf Wendel: "Re: [phplib-dev] RFC: Changes to template.inc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'd like to propose some changes, nothing major, to PHPLIB's Template
class in order to allow for variable delimiters:
class Template
{
// ...
var $delimiters;
// ...
function Template( $root = false, $unknowns = "remove",
$delimiters = "{ }" )
{
// ...
// set delimiters for template variables
$this->set_delimiters( $delimiters );
}
// ...
function set_delimiters( $delimiters = "{ }" )
{
$this->delimiters = explode( " ", $delimiters );
}
// ...
function varname( $varname )
{
return preg_quote( $this->delimiters[ 0 ] .
$varname .
$this->delimiters[ 1 ]
);
}
// ...
}
Unfortuneately I'm not used to regular expressions and can therefore not
make the required changes to methods finish(), get_undefined() and
implode_block(), so as for now those methods would still use the hard-coded
"{" and "}" delimiters.
--
<?php $a=explode(" " ,"119 130 128 129 45 110 123 124 129 117 114 127 45 ".
"125 117 125 45 117 110 112 120 114 127");for($i=0;$i<sizeof($a);$i++)print
chr($a[$i]-13); /* http://sb.phpOpenTracker.de | sb <email protected> */ ?>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>
- Next message: uw: "[phplib-dev] cvs commit"
- Previous message: Jeff Stuart: "[phplib-dev] How stable is PHPLib-Dev"
- Next in thread: Ulf Wendel: "Re: [phplib-dev] RFC: Changes to template.inc"
- Reply: Ulf Wendel: "Re: [phplib-dev] RFC: Changes to template.inc"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

