From 91b965181f907b169aeeff63a6c15f9b8df9d9a9 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 3 Feb 2013 12:07:37 +0100 Subject: Some minor documentation fixes Grammar and spelling... --- docu/language_definition.html | 10 +++++----- docu/nd/files/stupid_template_engine-php.html | 2 +- stupid_template_engine.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docu/language_definition.html b/docu/language_definition.html index 2c809bc..77cb680 100644 --- a/docu/language_definition.html +++ b/docu/language_definition.html @@ -217,7 +217,7 @@ If $foo is not empty, then Bar will be executed, otherwise Baz.

Short syntax for if-clause

-

Because if-clauses are used often, there is an short syntax:

+

Because if-clauses are used often, there is a short syntax:

?{condition|then|else}

This is equivalent to:

<ste:if>condition<ste:then>then</ste:then><ste:else>else</ste:else></ste:if>

@@ -358,7 +358,7 @@ array Yes - The array to be looped through. + The array to be looped through (expects variable name). key @@ -385,7 +385,7 @@

ste:infloop

-

Create an infinitive loop. You can get out of the loop using the ste:break tag. Can be used to emulate other loop constructs like while loops.

+

Creates an infinitive loop. You can get out of the loop using the ste:break tag. Can be used to emulate other loop constructs like while loops.

Example:

<ste:infloop>
<ste:if>
<ste:foo />
<ste:then><ste:break /></ste:then>
</ste:if>
...
<ste:infloop>
@@ -416,7 +416,7 @@

ste:block

-

ste:block provides an easy way for writing master templates. Every block has a name. When a block is defined twice, the second will overwrite the first one.

+

ste:block provides an easy way for writing master templates. Every block has a name. When a block is defined twice, the second one will overwrite the first one.

The name can be set with the name parameter.

Example:
@@ -441,7 +441,7 @@

ste:get

-

ste:get will return the content of a variable. The parameter var takes the name of the variable to get. Usefult, if you want to get a variable which name is stored in a variable.

+

ste:get will return the content of a variable. The parameter var takes the name of the variable to get. Useful, if you want to get a variable which name is stored in a variable.

Example:

<ste:get var="$foo" />
diff --git a/docu/nd/files/stupid_template_engine-php.html b/docu/nd/files/stupid_template_engine-php.html index 91d6080..937b766 100644 --- a/docu/nd/files/stupid_template_engine-php.html +++ b/docu/nd/files/stupid_template_engine-php.html @@ -61,7 +61,7 @@ if (browserType) {document.write("
");if (browserV

__construct

public function __construct($storage_access)

Parameters

$storage_accessAn Instance of a StorageAccess implementation.
-

register_tag

public function register_tag($name,
$callback)

Register a custom tag.

Parameters

$nameThe name of the tag.
$callbackA callable function (This must tage three parameters: The STECore instance, an associative array of parameters, and a function representing the tags content(This expects the STECore instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the STECore instance as a parameter)).

Throws

An Exception if the tag could not be registered (if $callback is not callable or if $name is empty)

+

register_tag

public function register_tag($name,
$callback)

Register a custom tag.

Parameters

$nameThe name of the tag.
$callbackA callable function (This must take three parameters: The STECore instance, an associative array of parameters, and a function representing the tags content(This expects the STECore instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the STECore instance as a parameter)).

Throws

An Exception if the tag could not be registered (if $callback is not callable or if $name is empty)

call_tag

public function call_tag($name,
$params,
$sub)

Calling a custom tag (builtin ones can not be called)

Parameters

$nameThe Tag’s name
$paramsAssociative array of parameters
$subA callable function (expecting an STECore instance as it’s parameter) that represents the tag’s content.

Throws

Might throw a FatalRuntimeError (see $fatal_error_on_missing_tag.

Returns

The output of the tag or, if a RuntimeError was thrown, the appropiate result (see $mute_runtime_errors).

diff --git a/stupid_template_engine.php b/stupid_template_engine.php index aadbb86..7153a99 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -1078,7 +1078,7 @@ class STECore * * Parameters: * $name - The name of the tag. - * $callback - A callable function (This must tage three parameters: The instance, an associative array of parameters, and a function representing the tags content(This expects the instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the instance as a parameter)). + * $callback - A callable function (This must take three parameters: The instance, an associative array of parameters, and a function representing the tags content(This expects the instance as its only parameter and returns its text result, i.e to get the text, you neeed to call this function with the instance as a parameter)). * * Throws: * An Exception if the tag could not be registered (if $callback is not callable or if $name is empty) -- cgit v1.2.3-54-g00ecf