ArrayIntType

PHP version: 5

Required modules: standard

Required packages: TypeInterface.php, Printable.php



class it\icosaedro\phplint\ArrayIntType
      |  
      `--(it\icosaedro\phplint\TypeInterface)
           `--(it\icosaedro\containers\Printable)

Represents the type array[int]E that is an array with int indeces

Version: $Date: 2012/02/01 08:11:47 $

Author: Umberto Salsi <salsi@icosaedro.it>

The Types::parseType() method uses this class to represent the result of the compilation of a textual type descriptor.


{

void __construct(
        it\icosaedro\phplint\TypeInterface $element_type)

Creates a new array type array[int]E

Parameters:
$element_type   Type of the elements.


it\icosaedro\phplint\TypeInterface getElementType()

Returns the type of the elements

Return: Type of the elements.


boolean check(
        mixed $v)

implements it\icosaedro\phplint\TypeInterface

Checks if the value is an array of type array[int]E

Parameters:
$v   Any expression or variable.

Return: True if the value is either NULL or an array whose entries have a key of type int and a value of the type as set by the constructor.


string __toString()
implements it\icosaedro\containers\Printable

Returns this type descriptor

Return: The string "E[int]" where E is the type set in the constructor.


}


Generated by PHPLint Documentator