BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
phpDocumentor\Reflection\Types\Array_ Class Reference
Inheritance diagram for phpDocumentor\Reflection\Types\Array_:
Collaboration diagram for phpDocumentor\Reflection\Types\Array_:

Public Member Functions

 __construct (Type $valueType=null, Type $keyType=null)
 
 getKeyType ()
 
 getValueType ()
 
 __toString ()
 

Detailed Description

Represents an array type as described in the PSR-5, the PHPDoc Standard.

An array can be represented in two forms:

  1. Untyped (array), where the key and value type is unknown and hence classified as 'Mixed_'.
  2. Types (string[]), where the value type is provided by preceding an opening and closing square bracket with a type name.

Constructor & Destructor Documentation

phpDocumentor\Reflection\Types\Array_::__construct ( Type  $valueType = null,
Type  $keyType = null 
)

Initializes this representation of an array with the given Type or Fqsen.

Parameters
Type$valueType
Type$keyType

Member Function Documentation

phpDocumentor\Reflection\Types\Array_::__toString ( )

Returns a rendered output of the Type as it would be used in a DocBlock.

Returns
string

Implements phpDocumentor\Reflection\Type.

phpDocumentor\Reflection\Types\Array_::getKeyType ( )

Returns the type for the keys of this array.

Returns
Type
phpDocumentor\Reflection\Types\Array_::getValueType ( )

Returns the value for the keys of this array.

Returns
Type

The documentation for this class was generated from the following file: