Zend\Stdlib\PriorityList
Priority list
Synopsis
class PriorityList
implements
Iterator,Countable
{
- // constants
- const EXTR_DATA = 0x00000001;
- const EXTR_PRIORITY = 0x00000002;
- const EXTR_BOTH = 0x00000003;
- // members
- protected array $items;
- protected integer $serial;
- protected integer $isLIFO;
- protected integer $count;
- protected bool $sorted;
- // methods
- public void insert()
- public void setPriority()
- public void remove()
- public void clear()
- public mixed get()
- protected void sort()
- protected int compare()
- public bool isLIFO()
- public void rewind()
- public mixed current()
- public string key()
- public mixed next()
- public bool valid()
- public int count()
- public array toArray()
Hierarchy
Constants
Name | Value |
---|---|
EXTR_DATA | 0x00000001 |
EXTR_PRIORITY | 0x00000002 |
EXTR_BOTH | 0x00000003 |
Members
protected
- $count
—
int
Internal counter to avoid usage of count(). - $isLIFO
—
integer
Serial order mode - $items
—
array
Internal list of all items. - $serial
—
int
Serial assigned to items to preserve LIFO. - $sorted
—
Zend\Stdlib\bool
Whether the list was already sorted.
Methods
protected
public
- clear() — Remove all items.
- count() — count(): defined by Countable interface.
- current() — current(): defined by Iterator interface.
- get() — Get a item.
- insert() — Insert a new item.
- isLIFO() — Get/Set serial order mode
- key() — key(): defined by Iterator interface.
- next() — next(): defined by Iterator interface.
- remove() — Remove a item.
- rewind() — rewind(): defined by Iterator interface.
- setPriority()
- toArray() — Return list as array
- valid() — valid(): defined by Iterator interface.