cvs: pear /HTML_Template_IT IT.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Fri, 28 Oct 2005 10:32:28 +0000 |
| Subject: | cvs: pear /HTML_Template_IT IT.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35922@lists.php.net to get a copy of this message | ||
dufuz Fri Oct 28 06:32:28 2005 EDT
Modified files:
/pear/HTML_Template_IT IT.php
Log:
more CS police action, " -> ' where it should be and similar fixes.
http://cvs.php.net/diff.php/pear/HTML_Template_IT/IT.php?r1=1.11&r2=1.12&ty=u
Index: pear/HTML_Template_IT/IT.php
diff -u pear/HTML_Template_IT/IT.php:1.11 pear/HTML_Template_IT/IT.php:1.12
--- pear/HTML_Template_IT/IT.php:1.11 Fri Oct 28 06:22:54 2005
+++ pear/HTML_Template_IT/IT.php Fri Oct 28 06:32:27 2005
@@ -16,7 +16,7 @@
// | Author: Ulf Wendel <ulf.wendel@phpdoc.de> |
// +----------------------------------------------------------------------+
//
-// $Id: IT.php,v 1.11 2005/10/28 10:22:54 dufuz Exp $
+// $Id: IT.php,v 1.12 2005/10/28 10:32:27 dufuz Exp $
//
require_once 'PEAR.php';
@@ -118,7 +118,7 @@
* </code>
*
* @author Ulf Wendel <uw@netuse.de>
- * @version $Id: IT.php,v 1.11 2005/10/28 10:22:54 dufuz Exp $
+ * @version $Id: IT.php,v 1.12 2005/10/28 10:32:27 dufuz Exp $
* @access public
* @package HTML_Template_IT
*/
@@ -144,7 +144,7 @@
* @access public
* @see $closingDelimiter, $blocknameRegExp, $variablenameRegExp
*/
- var $openingDelimiter = "{";
+ var $openingDelimiter = '{';
/**
* Last character of a variable placeholder ( {VARIABLE_}_ ).
@@ -152,7 +152,7 @@
* @access public
* @see $openingDelimiter, $blocknameRegExp, $variablenameRegExp
*/
- var $closingDelimiter = "}";
+ var $closingDelimiter = '}';
/**
* RegExp matching a block in the template.
@@ -162,7 +162,7 @@
* @access public
* @see $variablenameRegExp, $openingDelimiter, $closingDelimiter
*/
- var $blocknameRegExp = "[0-9A-Za-z_-]+";
+ var $blocknameRegExp = '[0-9A-Za-z_-]+';
/**
* RegExp matching a variable placeholder in the template.
@@ -172,7 +172,7 @@
* @access public
* @see $blocknameRegExp, $openingDelimiter, $closingDelimiter
*/
- var $variablenameRegExp = "[0-9A-Za-z_-]+";
+ var $variablenameRegExp = '[0-9A-Za-z_-]+';
/**
* RegExp used to find variable placeholder, filled by the constructor.
@@ -213,7 +213,7 @@
* Name of the current block.
* @var string
*/
- var $currentBlock = "__global__";
+ var $currentBlock = '__global__';
/**
* Content of the template.
@@ -373,12 +373,12 @@
if (!is_null($options)) {
$this->setOptions($options);
}
- $this->variablesRegExp = "@" . $this->openingDelimiter .
- "(" . $this->variablenameRegExp . ")" .
- $this->closingDelimiter . "@sm";
- $this->removeVariablesRegExp = "@" . $this->openingDelimiter .
+ $this->variablesRegExp = '@' . $this->openingDelimiter .
+ '(' . $this->variablenameRegExp . ')' .
+ $this->closingDelimiter . '@sm';
+ $this->removeVariablesRegExp = '@' . $this->openingDelimiter .
"\s*(" . $this->variablenameRegExp .
- ")\s*" . $this->closingDelimiter
."@sm";
+ ")\s*" . $this->closingDelimiter
.'@sm';
$this->blockRegExp = '@<!--\s+BEGIN\s+(' . $this->blocknameRegExp .
')\s+-->(.*)<!--\s+END\s+\1\s+-->@sm';
@@ -438,7 +438,7 @@
* Print a certain block with all replacements done.
* @brother get()
*/
- function show($block = "__global__")
+ function show($block = '__global__')
{
print $this->get($block);
} // end func show
@@ -452,10 +452,10 @@
* @access public
* @see show()
*/
- function get($block = "__global__")
+ function get($block = '__global__')
{
- if ($block == "__global__" && !$this->flagGlobalParsed) {
- $this->parse("__global__");
+ if ($block == '__global__' && !$this->flagGlobalParsed) {
+ $this->parse('__global__');
}
if (!isset($this->blocklist[$block])) {
@@ -494,7 +494,7 @@
* @see parseCurrentBlock()
* @throws PEAR_Error
*/
- function parse($block = "__global__", $flag_recursion = false)
+ function parse($block = '__global__', $flag_recursion = false)
{
static $regs, $values;
@@ -505,7 +505,7 @@
);
}
- if ($block == "__global__") {
+ if ($block == '__global__') {
$this->flagGlobalParsed = true;
}
@@ -640,7 +640,7 @@
* @throws PEAR_Error
* @access public
*/
- function setCurrentBlock($block = "__global__")
+ function setCurrentBlock($block = '__global__')
{
if (!isset($this->blocklist[$block])) {
@@ -708,7 +708,7 @@
{
$this->err = array();
- $this->currentBlock = "__global__";
+ $this->currentBlock = '__global__';
$this->variableCache = array();
$this->blocklookup = array();
@@ -740,7 +740,7 @@
$this->variableCache = array();
$this->blockdata = array();
$this->touchedBlocks = array();
- $this->currentBlock = "__global__";
+ $this->currentBlock = '__global__';
} else {
$this->template = '<!-- BEGIN __global__ -->' . $template .
'<!-- END __global__ -->';
@@ -829,10 +829,10 @@
$regs = array();
$values = array();
- foreach ($this->blockvariables["__global__"] as $allowedvar => $v) {
+ foreach ($this->blockvariables['__global__'] as $allowedvar => $v) {
if (isset($this->variableCache[$allowedvar])) {
- $regs[] = "@" . $this->openingDelimiter .
- $allowedvar . $this->closingDelimiter."@";
+ $regs[] = '@' . $this->openingDelimiter .
+ $allowedvar . $this->closingDelimiter . '@';
$values[] = $this->variableCache[$allowedvar];
unset($this->variableCache[$allowedvar]);
}
@@ -882,7 +882,7 @@
$this->blocklist[$blockname] = preg_replace(
$pattern,
$this->openingDelimiter .
- "__" . $name . "__" .
+ '__' . $name . '__' .
$this->closingDelimiter,
$this->blocklist[$blockname]
);