public function reprioritise($entry, $newPriority, $oldPriority = false)
    {
        $changedAnything = false;
        foreach ($this->entries as $i => &$entryData) {
            if ($entry === $entryData['data'] && ($oldPriority === false || $entryData['priority'] == $oldPriority)) {
                $entryData['priority'] = $newPriority;
                $changedAnything = true;
            }
        }
        if ($changedAnything) {
            $this->sorted = false;
        }
        return $this;
    }
public function reprioritise($entry, $newPriority, $oldPriority = false)
    {
        $changedAnything = false;
        foreach ($this->entries as $i => &$entryData) {
            if ($entry === $entryData['data'] && ($oldPriority === false || $entryData['priority'] == $oldPriority)) {
                $entryData['priority'] = $newPriority;
                $changedAnything = true;
            }
        }
        if ($changedAnything) {
            $this->sorted = false;
        }
        return $this;
    }
public function reprioritise ( $ entry , $ newPriority , $ oldPriority = false ) { $ changedAnything = false ; foreach ( $ this -> entries as $ i => & $ entryData ) { if ( $ entry === $ entryData [ 'data' ] && ( $ oldPriority === false || $ entryData [ 'priority' ] == $ oldPriority ) ) { $ entryData [ 'priority' ] = $ newPriority ; $ changedAnything = true ; } } if ( $ changedAnything ) { $ this -> sorted = false ; } return $ this ; }
change the priority for an entry.
@param mixed $entry
@param int $newPriority
@param bool|int $oldPriority If falsechange remove all instances of $entry from the list, otherwise only those with matching priority
@return $this
change the priority for an entry .