Author: dr
Date: Mon Aug 13 10:54:30 2007
New Revision: 5882
Log:
- Fixed some whitespace issues... however, there are still MANY left that ought
to be addressed.
Modified:
trunk/Template/src/interfaces/location.php
trunk/Template/src/parsers/source_to_tst/implementations/cache.php
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_cached_transformer.php
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
Modified: trunk/Template/src/interfaces/location.php
==============================================================================
--- trunk/Template/src/interfaces/location.php [iso-8859-1] (original)
+++ trunk/Template/src/interfaces/location.php [iso-8859-1] Mon Aug 13 10:54:30
2007
@@ -29,7 +29,7 @@
* {
* public static function getCustomFunctionDefinition( $name )
* {
- * if( $name === "dynloc" )
+ * if ( $name === "dynloc" )
* {
* $def = new ezcTemplateCustomFunctionDefinition();
* $def->class = __CLASS__;
Modified: trunk/Template/src/parsers/source_to_tst/implementations/cache.php
==============================================================================
--- trunk/Template/src/parsers/source_to_tst/implementations/cache.php
[iso-8859-1] (original)
+++ trunk/Template/src/parsers/source_to_tst/implementations/cache.php
[iso-8859-1] Mon Aug 13 10:54:30 2007
@@ -68,7 +68,7 @@
$cacheNode = new ezcTemplateCacheTstNode( $this->parser->source,
$this->startCursor, $cursor );
$cacheNode->type = ezcTemplateCacheTstNode::TYPE_CACHE_TEMPLATE;
}
- // //////// HERE
+ // // // //// HERE
elseif ($cursor->match( "cache_block" ) )
{
$this->parser->hasCacheBlocks = true;
@@ -90,7 +90,7 @@
return true;
}
}
- // ///////// ENDHERE
+ // // // ///// ENDHERE
else
{
return false;
Modified:
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_cached_transformer.php
==============================================================================
---
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_cached_transformer.php
[iso-8859-1] (original)
+++
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_cached_transformer.php
[iso-8859-1] Mon Aug 13 10:54:30 2007
@@ -84,7 +84,7 @@
*/
protected function _fopenCacheFileWriteMode()
{
- //return new ezcTemplateGenericStatementAstNode( new
ezcTemplateAssignmentOperatorAstNode( $this->getFp(), new
ezcTemplateFunctionCallAstNode( "fopen", array( new ezcTemplateVariableAstNode(
"_ezcTemplateCache" ), new ezcTemplateLiteralAstNode( "w") )) ) );
+ // return new ezcTemplateGenericStatementAstNode( new
ezcTemplateAssignmentOperatorAstNode( $this->getFp(), new
ezcTemplateFunctionCallAstNode( "fopen", array( new ezcTemplateVariableAstNode(
"_ezcTemplateCache" ), new ezcTemplateLiteralAstNode( "w") )) ) );
return new ezcTemplateGenericStatementAstNode( new
ezcTemplateAssignmentOperatorAstNode( $this->getFp(), new
ezcTemplateLiteralAstNode("")));
}
@@ -94,7 +94,7 @@
protected function _fwritePhpOpen()
{
return new ezcTemplateGenericStatementAstNode( new
ezcTemplateConcatAssignmentOperatorAstNode( $this->getFp(), new
ezcTemplateConcatOperatorAstNode( new ezcTemplateLiteralAstNode('<'), new
ezcTemplateLiteralAstNode("?php\n" ) ) ) );
- //return new ezcTemplateGenericStatementAstNode( new
ezcTemplateFunctionCallAstNode( "fwrite", array( $this->getFp(), new
ezcTemplateConcatOperatorAstNode( new ezcTemplateLiteralAstNode('<'), new
ezcTemplateLiteralAstNode("?php\n" ) ) ) ) );
+ // return new ezcTemplateGenericStatementAstNode( new
ezcTemplateFunctionCallAstNode( "fwrite", array( $this->getFp(), new
ezcTemplateConcatOperatorAstNode( new ezcTemplateLiteralAstNode('<'), new
ezcTemplateLiteralAstNode("?php\n" ) ) ) ) );
}
/**
@@ -128,7 +128,7 @@
protected function _fwriteLiteral( $literalValue )
{
return new ezcTemplateGenericStatementAstNode( new
ezcTemplateConcatAssignmentOperatorAstNode( $this->getFp(), new
ezcTemplateLiteralAstNode( $literalValue ) ) );
- //return new ezcTemplateGenericStatementAstNode( new
ezcTemplateFunctionCallAstNode( "fwrite", array( $this->getFp(), new
ezcTemplateLiteralAstNode( $literalValue ) ) ) );
+ // return new ezcTemplateGenericStatementAstNode( new
ezcTemplateFunctionCallAstNode( "fwrite", array( $this->getFp(), new
ezcTemplateLiteralAstNode( $literalValue ) ) ) );
}
@@ -138,7 +138,7 @@
protected function _fwriteVariable( $variableName )
{
return new ezcTemplateGenericStatementAstNode( new
ezcTemplateConcatAssignmentOperatorAstNode( $this->getFp(),
$this->createVariableNode( $variableName ) ) );
- //return new ezcTemplateGenericStatementAstNode( new
ezcTemplateFunctionCallAstNode( "fwrite", array( $this->getFp(),
$this->createVariableNode( $variableName ) ) ) );
+ // return new ezcTemplateGenericStatementAstNode( new
ezcTemplateFunctionCallAstNode( "fwrite", array( $this->getFp(),
$this->createVariableNode( $variableName ) ) ) );
}
@@ -389,7 +389,7 @@
for( $i = 0; $i < $elemLen; $i++)
{
$element = $type->elements[$i];
- if( $element instanceof ezcTemplateCacheTstNode )
+ if ( $element instanceof ezcTemplateCacheTstNode )
{
break;
}
Modified:
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
==============================================================================
---
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
[iso-8859-1] (original)
+++
trunk/Template/src/parsers/tst_to_ast/implementations/tst_to_ast_transformer.php
[iso-8859-1] Mon Aug 13 10:54:30 2007
@@ -680,15 +680,15 @@
$this->outputVariable->pop();
$functionParameters = array( $params, $customBlockOutput );
- if ( isset($def->sendTemplateObject) && $def->sendTemplateObject )
- {
- array_unshift ( $functionParameters, new
ezcTemplateVariableAstNode("this->template"));
+ if ( isset( $def->sendTemplateObject ) && $def->sendTemplateObject
)
+ {
+ array_unshift( $functionParameters, new
ezcTemplateVariableAstNode("this->template"));
}
$result[] = new ezcTemplateGenericStatementAstNode(
new ezcTemplateConcatAssignmentOperatorAstNode(
$this->outputVariable->getAst(),
new ezcTemplateFunctionCallAstNode( $class . $def->method,
- $functionParameters ) ) );
+ $functionParameters ) ) );
return $result;
}
@@ -700,11 +700,11 @@
$p = array();
// Check whether all values are static.
- for( $i = 0; $i < sizeof( $params->value ); $i++)
+ for ( $i = 0; $i < sizeof( $params->value ); $i++ )
{
- if ( !($params->value[$i] instanceof
ezcTemplateLiteralAstNode ) )
+ if ( !( $params->value[$i] instanceof
ezcTemplateLiteralAstNode ) )
{
- throw new ezcTemplateParserException($type->source,
$type->startCursor, $type->startCursor, "The *static* CustomBlock needs static
parameters.");
+ throw new ezcTemplateParserException( $type->source,
$type->startCursor, $type->startCursor, "The *static* CustomBlock needs static
parameters." );
}
$p[$params->keys[$i]->value] = $params->value[$i]->value;
@@ -712,29 +712,29 @@
}
// call the method.
- if ( !isset($def->class) || $def->class === false )
+ if ( !isset( $def->class ) || $def->class === false )
{
- $r = call_user_func_array( $def->method, array($p) );
+ $r = call_user_func_array( $def->method, array( $p ) );
}
else
{
- $r = call_user_func_array( array($def->class,
$def->method), array($p) );
+ $r = call_user_func_array( array( $def->class,
$def->method ), array( $p ) );
}
// And assign it to the output.
- return $this->assignToOutput( new
ezcTemplateLiteralAstNode($r) );
+ return $this->assignToOutput( new ezcTemplateLiteralAstNode(
$r ) );
}
$functionParameters = array( $params );
- if ( isset($def->sendTemplateObject) && $def->sendTemplateObject )
- {
- array_unshift ( $functionParameters, new
ezcTemplateVariableAstNode("this->template"));
+ if ( isset( $def->sendTemplateObject ) && $def->sendTemplateObject
)
+ {
+ array_unshift( $functionParameters, new
ezcTemplateVariableAstNode( "this->template" ) );
}
return new ezcTemplateGenericStatementAstNode(
new ezcTemplateConcatAssignmentOperatorAstNode(
$this->outputVariable->getAst(),
- new ezcTemplateFunctionCallAstNode( $class .$def->method,
+ new ezcTemplateFunctionCallAstNode( $class . $def->method,
$functionParameters ) ) );
}
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components