diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-07-29 11:42:02 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-07-29 11:42:02 -0300 |
commit | bb3c9a26bb75c76c5934d327548bf08606467b9f (patch) | |
tree | 26760aa866799fc70683ef6845bf54fb17bdc955 /engine/classes/ElggPriorityList.php | |
parent | 2feedf39f6484879333a7b77fdc3c184150db8c7 (diff) | |
parent | 398572fd96c72b363fd5a252fb9cbe1cecab1e04 (diff) | |
download | elgg-bb3c9a26bb75c76c5934d327548bf08606467b9f.tar.gz elgg-bb3c9a26bb75c76c5934d327548bf08606467b9f.tar.bz2 |
Merge branch 'floxglove-3' into saravea
Conflicts:
.gitmodules
Diffstat (limited to 'engine/classes/ElggPriorityList.php')
-rw-r--r-- | engine/classes/ElggPriorityList.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/engine/classes/ElggPriorityList.php b/engine/classes/ElggPriorityList.php index 8a3b836a8..b5f8fe163 100644 --- a/engine/classes/ElggPriorityList.php +++ b/engine/classes/ElggPriorityList.php @@ -89,7 +89,7 @@ * return true; * } * - * @package Elgg.Core + * @package Elgg.Core * @subpackage Helpers */ class ElggPriorityList @@ -126,7 +126,9 @@ class ElggPriorityList * maintains its priority and the new element is to the next available * slot, taking into consideration all previously registered elements. * Negative elements are accepted. + * @param bool $exact unused * @return int The priority of the added element. + * @todo remove $exact or implement it. Note we use variable name strict below. */ public function add($element, $priority = null, $exact = false) { if ($priority !== null && !is_numeric($priority)) { @@ -146,7 +148,8 @@ class ElggPriorityList * @warning The element must have the same attributes / values. If using $strict, it must have * the same types. array(10) will fail in strict against array('10') (str vs int). * - * @param type $element + * @param mixed $element The element to remove from the list + * @param bool $strict Whether to check the type of the element match * @return bool */ public function remove($element, $strict = false) { @@ -162,10 +165,10 @@ class ElggPriorityList /** * Move an existing element to a new priority. * - * @param mixed $current_priority - * @param int $new_priority - * - * @return int The new priority. + * @param mixed $element The element to move + * @param int $new_priority The new priority for the element + * @param bool $strict Whether to check the type of the element match + * @return bool */ public function move($element, $new_priority, $strict = false) { $new_priority = (int) $new_priority; @@ -200,12 +203,12 @@ class ElggPriorityList * * If no user function is provided the elements are sorted by priority registered. * - * The callback function should accept the array of elements as the first argument and should - * return a sorted array. + * The callback function should accept the array of elements as the first + * argument and should return a sorted array. * * This function can be called multiple times. * - * @param type $callback + * @param callback $callback The callback for sorting. Numeric sorting is the default. * @return bool */ public function sort($callback = null) { @@ -268,7 +271,7 @@ class ElggPriorityList /** * Returns the element at $priority. * - * @param int $priority + * @param int $priority The priority * @return mixed The element or false on fail. */ public function getElement($priority) { |