Methods summary
public
|
#
__construct( )
Constructor to make an empty instance.
Constructor to make an empty instance.
|
public static
Pinoco_List
|
#
fromArray( mixed $src )
Makes a new object from Array.
Makes a new object from Array.
Parameters
Returns
Implementation of
|
public static
Pinoco_List
|
#
wrap( array & $srcref )
Wraps an existing Array.
Parameters
Returns
Throws
InvalidArgumentException
Implementation of
|
public
|
#
push( mixed $value,… )
Appends a value to tail.
Parameters
|
public
mixed
|
#
pop( )
Removes and return a value from tail.
Removes and return a value from tail.
Returns
mixed
|
public
|
#
unshift( mixed $value,… )
Inserts a value to head.
Parameters
|
public
mixed
|
#
shift( )
Removes and return a value from head.
Removes and return a value from head.
Returns
mixed
|
public
|
#
concat( mixed $source,… )
Concatenates another iterative object.
Concatenates another iterative object.
Parameters
- $source,…
mixed $source,...
|
public
|
#
sort( callable $callable = null )
Sorts this list.
Parameters
- $callable
callable $callable
|
public
Pinoco_List
|
#
sorted( callable $callable = null )
Returns sorted list.
Parameters
- $callable
callable $callable
Returns
|
public
integer
|
#
count( )
Returns a number of element of this list.
Returns a number of element of this list.
Returns
integer
Implementation of
Countable::count()
|
public
string
|
#
join( string $sep = "," )
Converts this list to string.
Converts this list to string.
Parameters
Returns
string
|
public
Pinoco_List
|
#
reverse( )
Returns a reversed list.
Returns
|
public
Pinoco_List
|
#
slice( integer $offset, integer $length = null )
Returns a slice.
Parameters
- $offset
integer $offset
- $length
integer $length
Returns
|
public
Pinoco_List;
|
#
splice( integer $offset, integer $length = null, array $replacement = null )
Removes elements by range and inserts another.
Removes elements by range and inserts another.
Parameters
- $offset
integer $offset
- $length
integer $length
- $replacement
array $replacement
Returns
Pinoco_List;
|
public
|
#
insert( integer $offset, mixed $value,… )
Inserts another.
Parameters
- $offset
integer $offset
- $value,…
mixed $value,...
|
public
|
#
remove( integer $offset, integer $length = 1 )
Removes by range.
Parameters
- $offset
integer $offset
- $length
integer $length
|
public
integer
|
#
index( mixed $value )
Returns the first position where value found in this list.
Returns the first position where value found in this list.
Parameters
Returns
integer
|
public
mixed
|
#
get( integer $idx, mixed $default = Pinoco_OptionalParam::UNSPECIFIED )
Returns value or default by position.
Returns value or default by position.
Parameters
- $idx
integer $idx
- $default
mixed $default
Returns
mixed
Implementation of
|
public
mixed
|
#
rget( string $expression, mixed $default = Pinoco_OptionalParam::UNSPECIFIED )
Returns a value or default by tree expression.
Returns a value or default by tree expression.
Parameters
- $expression
string $expression
- $default
mixed $default
Returns
mixed
Implementation of
|
public
|
|
public
|
#
setDefault( mixed $value )
Sets a default value for overflow access.
Sets a default value for overflow access.
Parameters
|
public
array
|
#
toArray( array $modifier = null )
Exports elements to Array.
Exports elements to Array.
Parameters
Returns
array
Implementation of
|
public
array
|
#
toArrayRecurse( integer $depth = null )
Exports properties to Array recursively.
Exports properties to Array recursively.
Parameters
Returns
array
Implementation of
|
public
mixed
|
#
reduce( callable $callable, mixed $initial = null )
Fold operation for each elements.
Fold operation for each elements.
Parameters
- $callable
callable $callable
- $initial
mixed $initial
Returns
mixed
|
public
|
#
each( callable $callable )
Some operation for each elements.
Some operation for each elements.
Parameters
- $callable
callable $callable
|
public
Pinoco_List
|
#
map( callable $callable )
Regenerates list from this list which elements are applied given
function.
Regenerates list from this list which elements are applied given
function.
Parameters
- $callable
callable $callable
Returns
|
public
Pinoco_List
|
#
filter( callable $callable )
Regenerates list from this list which elements are filtered by given
function.
Regenerates list from this list which elements are filtered by given
function.
Parameters
- $callable
callable $callable
Returns
|
public
|
#
offsetSet( mixed $offset, mixed $value )
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
offsetExists( mixed $offset )
Implementation of
ArrayAccess::offsetExists()
|
public
|
#
offsetUnset( mixed $offset )
Implementation of
ArrayAccess::offsetUnset()
|
public
|
#
offsetGet( mixed $offset )
Implementation of
ArrayAccess::offsetGet()
|
public
|
#
getIterator( )
Implementation of
IteratorAggregate::getIterator()
|
public
|
|