From 50ddd5e598fee58ef6841172fc0c02e4817eadc1 Mon Sep 17 00:00:00 2001 From: javalizard <> Date: Mon, 4 Oct 2010 03:17:41 +0000 Subject: #247 Removed one redundant function. --- framework/Collections/TPriorityList.php | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'framework/Collections') diff --git a/framework/Collections/TPriorityList.php b/framework/Collections/TPriorityList.php index ebb90b91..1b7cff32 100644 --- a/framework/Collections/TPriorityList.php +++ b/framework/Collections/TPriorityList.php @@ -412,30 +412,6 @@ class TPriorityList extends TList throw new TInvalidDataValueException('list_index_invalid',$index); } - /** - * Removes an item from a specific priority. The list will first search for the item - * at the priority. The first item found will be removed from the priority. - * @param mixed item to be removed. - * @param numeric priority - * @return integer the index within the priority at which the item is being removed - * @throws TInvalidDataValueException If the item does not exist - */ - public function removeFromPriority($item, $priority=null) - { - if($this->getReadOnly()) - throw new TInvalidOperationException('list_readonly',get_class($this)); - - if($priority===null) - $priority = $this->getDefaultPriority(); - $priority = (string)round(TPropertyValue::ensureFloat($priority), $this->_p); - - if(isset($this->_d[$priority]) && ($index=array_search($item,$this->_d[$priority],true))!==false) { - $this->removeAtIndexInPriority($index, $priority); - return $index; - } - throw new TInvalidDataValueException('list_item_inexistent'); - } - /** * Removes the item at a specific index within a priority. Override * and call this method to insert your own functionality. -- cgit v1.2.3