Author: Jan Borsodi
Date: 2006-12-21 13:01:20 +0100 (Thu, 21 Dec 2006)
New Revision: 4429
Log:
- Documentation fixes.
- Removed some dead code which referred to removed classes.
Modified:
trunk/Template/src/configuration.php
trunk/Template/src/contexts/xhtml_context.php
trunk/Template/src/interfaces/output_context.php
trunk/Template/src/parsers/ast/implementations/ast_tree_output.php
trunk/Template/src/parsers/ast_to_ast/implementations/ast_walker.php
trunk/Template/src/parsers/ast_to_php/implementations/php_generator.php
trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
trunk/Template/src/parsers/tst_to_tst/implementations/tst_walker.php
trunk/Template/src/source_code.php
trunk/Template/src/template.php
trunk/Template/src/template_autoload.php
Modified: trunk/Template/src/configuration.php
===================================================================
--- trunk/Template/src/configuration.php 2006-12-21 11:13:26 UTC (rev
4428)
+++ trunk/Template/src/configuration.php 2006-12-21 12:01:20 UTC (rev
4429)
@@ -33,7 +33,24 @@
* </code>
*
* The $context property is by default assigned to an ezcTemplateXhtmlContext
object.
- *
+ *
+ * @property ezcTemplateOutputContext $context
+ * Contains the template context.
+ * @property string $templatePath
+ * Base path where the source templates are stored.
+ * @property string $compilePath
+ * Base path where the compiled templates are stored.
+ * @property bool $checkModifiedTemplates
+ * Set to true, to recompile outdated compiled templates.
+ * @property string $cachedTemplatesPath
+ * Relative path from the compilePath.
+ * @property string $compiledTemplatesPath
+ * Relative path from the compilePath.
+ * @property ezcTemplateCustomBlockDefinition[] $customBlock
+ * The currently registered custom blocks.
+ * @property ezcTemplateCustomFunctionDefinition[] $customFunctions
+ * The currently registered custom functions.
+ *
* @package Template
* @version //autogen//
*/
@@ -67,14 +84,8 @@
/**
* Returns the value of the property $name.
*
- * The properties that can be retrieved are:
- *
- * - ezcTemplateOutputCollection context : Contains the template
context.
- * - string templatePath : Base path where the source
templates are stored.
- * - string compilePath : Base path where the compiled
templates are stored.
- * - bool checkModifiedTemplates : Set to true, to recompile
outdated compiled templates.
- *
* @param string $name
+ * @param string $name
*
* @throws ezcBasePropertyNotFoundException if the property does not exist.
* @return mixed
@@ -109,7 +120,9 @@
* - string templatePath : Base path where the source
templates are stored.
* - string compilePath : Base path where the compiled
templates are stored.
* - bool checkModifiedTemplates : Set to true, to recompile
outdated compiled templates.
- *
+ *
+ * @param string $name
+ * @param mixed $value
* @param string $name
* @param string $value
*
@@ -199,6 +212,9 @@
/**
* Returns the unique configuration instance named $name.
*
+ * Note: You only need to specify the name if you need multiple
configuration
+ * objects.
+ *
* @param string $name Name of the configuration to use.
* @return ezcTemplateConfiguration
*/
@@ -212,15 +228,20 @@
return self::$instanceList[$name];
}
-
/**
* Adds custom tags or function to the customBlock or customFunction
property and
* indirectly add the custom extension to the template language.
*
* The parameter $customBlockClass expects a class that implements either
- * the interface ezcTemplateCustomBlock, ezcTemplateCustomFunction, or
both.
+ * the interface ezcTemplateCustomBlock, ezcTemplateCustomFunction, or
both.
*
+ * New custom blocks are added to the
+ * [EMAIL PROTECTED] ezcTemplateConfiguration::customBlocks $customBlocks}
property while
+ * custom functions are added to the
+ * [EMAIL PROTECTED] ezcTemplateConfiguration::customFunctions
$customFunctions} property.
+ *
* @param string $customClass
+ * @throws ezcTemplateCustomBlockException if the $customClass parameter
is not a string.
* @return void
*/
public function addExtension( $customClass )
@@ -251,7 +272,5 @@
}
}
-
-
}
?>
Modified: trunk/Template/src/contexts/xhtml_context.php
===================================================================
--- trunk/Template/src/contexts/xhtml_context.php 2006-12-21 11:13:26 UTC
(rev 4428)
+++ trunk/Template/src/contexts/xhtml_context.php 2006-12-21 12:01:20 UTC
(rev 4429)
@@ -20,6 +20,8 @@
{
/**
* Escapes special HTML characters in the output.
+ *
+ * @return ezcTemplateAstNode The new AST node which should replace $node.
*/
public function transformOutput( ezcTemplateAstNode $node )
{
@@ -28,6 +30,8 @@
/**
* Returns the unique identifier for the context handler.
+ *
+ * @return string
*/
public function identifier()
{
Modified: trunk/Template/src/interfaces/output_context.php
===================================================================
--- trunk/Template/src/interfaces/output_context.php 2006-12-21 11:13:26 UTC
(rev 4428)
+++ trunk/Template/src/interfaces/output_context.php 2006-12-21 12:01:20 UTC
(rev 4429)
@@ -27,6 +27,7 @@
* Transforms an expressions so it can be displayed in the current output
context
* correctly.
*
+ * @return ezcTemplateAstNode The new AST node which should replace $node.
*/
public function transformOutput( ezcTemplateAstNode $node );
@@ -34,6 +35,8 @@
* Returns the unique identifier for the context handler. This is used to
* uniquely identify the handler, e.g. it is included in the path of
* compiled files.
+ *
+ * @return string
*/
public function identifier();
Modified: trunk/Template/src/parsers/ast/implementations/ast_tree_output.php
===================================================================
--- trunk/Template/src/parsers/ast/implementations/ast_tree_output.php
2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/parsers/ast/implementations/ast_tree_output.php
2006-12-21 12:01:20 UTC (rev 4429)
@@ -100,11 +100,6 @@
$this->text .= $this->outputNode( $node );
}
- public function visitDynamicFunctionCallAstNode(
ezcTemplateDynamicFunctionCallAstNode $node )
- {
- $this->text .= $this->outputNode( $node );
- }
-
public function visitBodyAstNode( ezcTemplateBodyAstNode $node )
{
$this->text .= $this->outputNode( $node );
Modified: trunk/Template/src/parsers/ast_to_ast/implementations/ast_walker.php
===================================================================
--- trunk/Template/src/parsers/ast_to_ast/implementations/ast_walker.php
2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/parsers/ast_to_ast/implementations/ast_walker.php
2006-12-21 12:01:20 UTC (rev 4429)
@@ -145,20 +145,6 @@
array_shift( $this->nodePath );
}
- public function visitDynamicFunctionCallAstNode(
ezcTemplateDynamicFunctionCallAstNode $fcall )
- {
-
- array_unshift( $this->nodePath, $fcall );
- $this->acceptAndUpdate( $fcall->nameExpression );
-
- foreach ( $fcall->getParameters() as $i => $parameter )
- {
- $this->acceptAndUpdate( $fcall->parameters[$i] );
- }
-
- array_shift( $this->nodePath );
- }
-
public function visitBodyAstNode( ezcTemplateBodyAstNode $body )
{
array_unshift( $this->nodePath, $body );
Modified:
trunk/Template/src/parsers/ast_to_php/implementations/php_generator.php
===================================================================
--- trunk/Template/src/parsers/ast_to_php/implementations/php_generator.php
2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/parsers/ast_to_php/implementations/php_generator.php
2006-12-21 12:01:20 UTC (rev 4429)
@@ -579,28 +579,6 @@
}
/**
- * Visits a code element containing a dynamic function call.
- * Function call consist of a function name expression and arguments.
- *
- * @param ezcTemplateFunctionCallAstNode $fcall The code element
containing the dynamic function call with arguments.
- */
- public function visitDynamicFunctionCallAstNode(
ezcTemplateDynamicFunctionCallAstNode $fcall )
- {
- // Generate code for function name
- $fcall->nameExpression->accept( $this );
-
- // Start arguments
- $this->write( "(" );
- foreach ( $fcall->getParameters() as $i => $parameter )
- {
- if ( $i > 0 )
- $this->write( "," );
- $parameter->accept( $this );
- }
- $this->write( ")" );
- }
-
- /**
* Visits a code element containing a body of statements.
* A body consists of a series of statements in sequence.
*
Modified: trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
===================================================================
--- trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/parsers/tst/implementations/tst_tree_output.php
2006-12-21 12:01:20 UTC (rev 4429)
@@ -85,11 +85,6 @@
$this->text .= $this->outputNode( $node );
}
- public function visitIntegerTstNode( ezcTemplateIntegerTstNode $node )
- {
- $this->text .= $this->outputNode( $node );
- }
-
public function visitVariableTstNode( ezcTemplateVariableTstNode $node )
{
$this->text .= $this->outputNode( $node );
@@ -295,11 +290,6 @@
$this->text .= $this->outputNode( $node );
}
- public function visitInstanceOfOperatorTstNode(
ezcTemplateInstanceOfOperatorTstNode $node )
- {
- $this->text .= $this->outputNode( $node );
- }
-
public function visitBlockCommentTstNode( ezcTemplateBlockCommentTstNode
$node )
{
$this->text .= $this->outputNode( $node );
Modified: trunk/Template/src/parsers/tst_to_tst/implementations/tst_walker.php
===================================================================
--- trunk/Template/src/parsers/tst_to_tst/implementations/tst_walker.php
2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/parsers/tst_to_tst/implementations/tst_walker.php
2006-12-21 12:01:20 UTC (rev 4429)
@@ -302,11 +302,6 @@
}
- public function visitInstanceOfOperatorTstNode(
ezcTemplateInstanceOfOperatorTstNode $node )
- {
- }
-
-
public function visitDynamicBlockTstNode( ezcTemplateDynamicBlockTstNode
$node )
{
}
Modified: trunk/Template/src/source_code.php
===================================================================
--- trunk/Template/src/source_code.php 2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/source_code.php 2006-12-21 12:01:20 UTC (rev 4429)
@@ -96,7 +96,7 @@
* The current context for the template code. Will be used for parsing and
* run-time behaviour.
*
- * @var ezcTemplateContext
+ * @var ezcTemplateOutputContext
* Note: __get/__set property
*/
// private $context;
@@ -173,12 +173,12 @@
* @param string $resource The requested resource string, if false $stream
* is used as value.
* @param string $code The source code for the template.
- * @param ezcTemplateContext $context The context for the parsing and
+ * @param ezcTemplateOutputContext $context The context for the parsing and
* run-time behaviour, a value of null
* means to use the current context in
* the template manager.
*/
- public function __construct( $stream, $resource = false, $code = false,
ezcTemplateContext $context = null )
+ public function __construct( $stream, $resource = false, $code = false,
ezcTemplateOutputContext $context = null )
{
$this->stream = $stream;
$this->resource = $resource;
Modified: trunk/Template/src/template.php
===================================================================
--- trunk/Template/src/template.php 2006-12-21 11:13:26 UTC (rev 4428)
+++ trunk/Template/src/template.php 2006-12-21 12:01:20 UTC (rev 4429)
@@ -113,16 +113,6 @@
/**
* Returns the value of the property $name.
*
- * The properties that can be retrieved are:
- *
- * - ezcTemplateVariableCollection [EMAIL PROTECTED] ezcTemplate::send
send} : Contains the variables that are send to the template.
- * - ezcTemplateVariableCollection [EMAIL PROTECTED] ezcTemplate::receive
receive} : Contains the variables that are returned by the template.
- * - ezcTemplateConfiguration [EMAIL PROTECTED] ezcTemplate::configuration
configuration} : Contains the template configuration.
- * - string [EMAIL PROTECTED] ezcTemplate::output output}
: The output of the last processed template.
- * - string [EMAIL PROTECTED] ezcTemplate::compiledTemplatePath
compiledTemplatePath} : The path of the compiled template.
- * - ezcTemplateTstNode [EMAIL PROTECTED] ezcTemplate::tstTree tstTree}
: The generated tstTree (debug).
- * - ezcTemplateAstNode [EMAIL PROTECTED] ezcTemplate::astTree astTree}
: The generated astTree (debug).
- *
* @throws ezcBasePropertyNotFoundException if the property does not exist.
* @param string $name
* @return mixed
@@ -182,11 +172,6 @@
/**
* Sets the property named $name to contain value of $value.
*
- * The properties that can be set are:
- *
- * - ezcTemplateVariableCollection send : Contains the variables that
are send to the template.
- * - ezcTemplateConfiguration configuration : Contains the template
configuration.
- *
* @throws ezcBasePropertyNotFoundException if the property does not exist.
* @param string $name
* @param mixed $value
Modified: trunk/Template/src/template_autoload.php
===================================================================
--- trunk/Template/src/template_autoload.php 2006-12-21 11:13:26 UTC (rev
4428)
+++ trunk/Template/src/template_autoload.php 2006-12-21 12:01:20 UTC (rev
4429)
@@ -68,7 +68,6 @@
"ezcTemplateModifyingBlockTstNode" =>
"Template/syntax_trees/tst/nodes/modifying_block.php",
"ezcTemplateLiteralArrayTstNode" =>
"Template/syntax_trees/tst/nodes/literalarray.php",
"ezcTemplateLiteralTstNode" =>
"Template/syntax_trees/tst/nodes/literal.php",
- "ezcTemplateIntegerTstNode" =>
"Template/syntax_trees/tst/nodes/integer.php",
"ezcTemplateVariableTstNode" =>
"Template/syntax_trees/tst/nodes/variable.php",
"ezcTemplateTextBlockTstNode" =>
"Template/syntax_trees/tst/nodes/text_block.php",
"ezcTemplateFunctionCallTstNode" =>
"Template/syntax_trees/tst/nodes/function_call.php",
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components