summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-09-13 21:28:14 +0200
committerLaria Carolin Chabowski <laria@laria.me>2020-09-13 21:28:14 +0200
commit805686b56b1f4149cfc791d9c93a828d66d4f171 (patch)
treed3a9dd45b52cf001ef1457ff82753e775e62f5ea
parent86a464ee4e33f803996bf740affb3a0d73b2050e (diff)
downloadste-805686b56b1f4149cfc791d9c93a828d66d4f171.tar.gz
ste-805686b56b1f4149cfc791d9c93a828d66d4f171.tar.bz2
ste-805686b56b1f4149cfc791d9c93a828d66d4f171.zip
Convert more documentation to phpDoc
-rw-r--r--src/ste/STECore.php53
1 files changed, 19 insertions, 34 deletions
diff --git a/src/ste/STECore.php b/src/ste/STECore.php
index 40d680a..f00a4f4 100644
--- a/src/ste/STECore.php
+++ b/src/ste/STECore.php
@@ -173,20 +173,15 @@ class STECore
return $output . $lastblock;
}
- /*
- * Function: get_var_reference
+ /**
* Get a reference to a template variable using a variable name.
* This can be used,if your custom tag takes a variable name as a parameter.
*
- * Parameters:
- * $name - The variables name.
- * $create_if_not_exist - Should the variable be created, if it does not exist? Otherwise NULL will be returned, if the variable does not exist.
- *
- * Throws:
- * <RuntimeError> if the variable name can not be parsed (e.g. unbalanced brackets).
+ * @param string $name The variables name.
+ * @param bool $create_if_not_exist Should the variable be created, if it does not exist? Otherwise NULL will be returned, if the variable does not exist.
*
- * Returns:
- * A Reference to the variable.
+ * @throws RuntimeError If the variable name can not be parsed (e.g. unbalanced brackets).
+ * @return mixed A Reference to the variable.
*/
public function &get_var_reference($name, $create_if_not_exist)
{
@@ -194,52 +189,42 @@ class STECore
return $ref;
}
- /*
- * Function: set_var_by_name
+ /**
* Set a template variable by its name.
* This can be used,if your custom tag takes a variable name as a parameter.
*
- * Parameters:
- * $name - The variables name.
- * $val - The new value.
+ * @param string $name The variables name.
+ * @param mixed $val The new value.
*
- * Throws:
- * <RuntimeError> if the variable name can not be parsed (e.g. unbalanced brackets).
+ * @throws RuntimeError If the variable name can not be parsed (e.g. unbalanced brackets).
*/
public function set_var_by_name($name, $val)
{
$this->scope->set_var_by_name($name, $val);
}
- /*
- * Function: set_local_var
- * Like <set_var_by_name>, but only sets the variable in the global scope (<set_var_by_name> will overwrite the variable in the parent scope, if it's defined there) .
+ /**
+ * Like {@see STECore::set_var_by_name}, but only sets the variable in the global scope
+ * ({@see STECore::set_var_by_name} will overwrite the variable in the parent scope, if it's defined there) .
*
- * Parameters:
- * $name - The variables name.
- * $val - The new value.
+ * @param string $name The variables name.
+ * @param mixed $val The new value.
*
- * Throws:
- * <RuntimeError> if the variable name can not be parsed (e.g. unbalanced brackets).
+ * @throws RuntimeError If the variable name can not be parsed (e.g. unbalanced brackets).
*/
public function set_local_var($name, $val)
{
$this->scope->set_local_var($name, $val);
}
- /*
- * Function: get_var_by_name
+ /**
* Get a template variable by its name.
* This can be used,if your custom tag takes a variable name as a parameter.
*
- * Parameters:
- * $name - The variables name.
- *
- * Throws:
- * <RuntimeError> if the variable name can not be parsed (e.g. unbalanced brackets).
+ * @param string $name The variables name.
*
- * Returns:
- * The variables value.
+ * @throws RuntimeError If the variable name can not be parsed (e.g. unbalanced brackets).
+ * @return mixed The variables value
*/
public function get_var_by_name($name)
{