From 4ff495652e32b9247bfed4929fb51cae349e64b6 Mon Sep 17 00:00:00 2001 From: Aleh Hutnikau Date: Mon, 7 Sep 2015 15:27:26 +0300 Subject: [PATCH] Add phpdoc --- qtism/runtime/tests/AssessmentItemSession.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qtism/runtime/tests/AssessmentItemSession.php b/qtism/runtime/tests/AssessmentItemSession.php index 5751febcf..1b284246c 100644 --- a/qtism/runtime/tests/AssessmentItemSession.php +++ b/qtism/runtime/tests/AssessmentItemSession.php @@ -1127,10 +1127,21 @@ public function onDurationUpdate(array $callback) { /** * Register callback function which will be invoked after method * specified in the $eventName parameter is called. + * Events available for callback registration: + * + * + * Note that first parameter passed to the callback function always will be instance of current class, + * and the remaining parameters will be taken from the $params array. * * @param string $eventName name of method of current class after which callback function will be invoked. * @param array $callback The function or method to be called. * This parameter may be an array, with the name of the class, and the method, or a string, with a function name. + * @param array $params Parameters to be passed to the callback, as an indexed array. */ public function registerCallback($eventName, $callback, $params = array()) { @@ -1143,9 +1154,10 @@ public function registerCallback($eventName, $callback, $params = array()) /** * Call callback functions registered for method specified in $eventName parameter. * $this variable will be passed to the callback function as first parameter. + * * @param string $eventName */ - public function runCallback($eventName) + protected function runCallback($eventName) { if (isset($this->callbacks[$eventName])) { foreach($this->callbacks[$eventName] as $callback) {