Priority list

package Default
inherited_from \Zend\Stdlib\PriorityList

 Methods

Remove all items.

clear() : void
Inherited

{@inheritDoc}

count() 
Inherited

{@inheritDoc}

current() 
Inherited

Get a item.

get(string $name) : mixed
Inherited

Parameters

$name

string

Returns

mixed

getIterator()

getIterator() : \Zend\Mvc\Router\PriorityList
Inherited
fluent This method is part of a fluent interface and will return the same instance

Returns

\Zend\Mvc\Router\PriorityList

Insert a new item.

insert(string $name, mixed $value, integer $priority = 0) : void
Inherited

Parameters

$name

string

$value

mixed

$priority

integer

Get/Set serial order mode

isLIFO(boolean|null $flag = null) : boolean
Inherited

Parameters

$flag

booleannull

Returns

boolean

{@inheritDoc}

key() 
Inherited

{@inheritDoc}

next() 
Inherited

Remove a item.

remove(string $name) : void
Inherited

Parameters

$name

string

{@inheritDoc}

rewind() 
Inherited

setPriority()

setPriority(string $name, integer $priority) : \Zend\Mvc\Router\PriorityList
Inherited
fluent This method is part of a fluent interface and will return the same instance

Parameters

$name

string

$priority

integer

Exceptions

\Exception

Returns

\Zend\Mvc\Router\PriorityList

Return list as array

toArray(integer $flag = self::EXTR_DATA) : array
Inherited

Parameters

$flag

integer

Returns

array

{@inheritDoc}

valid() 
Inherited

Compare the priority of two items.

compare(array $item1, array $item2) : integer
Inherited

Parameters

$item1

$item2

array

Returns

integer

Sort all items.

sort() : void
Inherited

 Properties

 

Internal counter to avoid usage of count().

$count : integer

Default

0
 

Serial order mode

$isLIFO : integer

Default

1
 

Internal list of all items.

$items : array<mixed,array>

Default

array()
 

Serial assigned to items to preserve LIFO.

$serial : integer

Default

0
 

Whether the list was already sorted.

$sorted : boolean

Default

false

 Constants

 

EXTR_BOTH

EXTR_BOTH = 3 
 

EXTR_DATA

EXTR_DATA = 1 
 

EXTR_PRIORITY

EXTR_PRIORITY = 2