PHP Class Phulp\Collection

Inheritance: extends Doctrine\Common\Collections\ArrayCollection
Mostra file Open project: reisraff/phulp Class Usage Examples

Protected Properties

Property Type Description
$type array Type of the elements.

Public Methods

Method Description
__construct ( array $collection = [], $type = null ) Initializes a new Collection.
__toString ( ) : string Returns a string representation of this object.
add ( $value ) {@inheritDoc}
getType ( ) : string Returns which is the type of the elements.
set ( $key, $value ) {@inheritDoc}

Protected Methods

Method Description
checkType ( $item ) : boolean Checks the immutability of the elements type
getItemType ( mixed $item ) : string Returns which is the type of the item.

Method Details

__construct() public method

Initializes a new Collection.
public __construct ( array $collection = [], $type = null )
$collection array

__toString() public method

Returns a string representation of this object.
public __toString ( ) : string
return string

add() public method

{@inheritDoc}
public add ( $value )

checkType() protected method

Checks the immutability of the elements type
protected checkType ( $item ) : boolean
return boolean

getItemType() protected method

Returns which is the type of the item.
protected getItemType ( mixed $item ) : string
$item mixed
return string

getType() public method

Returns which is the type of the elements.
public getType ( ) : string
return string

set() public method

{@inheritDoc}
public set ( $key, $value )

Property Details

$type protected_oe property

Type of the elements.
protected array $type
return array