Class TypeFactory
Static Factory for creating types
- chippyash\Type\AbstractTypeFactory
- chippyash\Type\TypeFactory
public static
|
#
setNumberType( string $requiredType )
Set the required number type to return By default this is self::TYPE_DEFAULT which is 'auto', meaning that the factory will determine if GMP is installed and use that else use PHP native types |
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
#
createComplex( integer|float|string|
Create a Complex number If imaginary part is null, a complex equivalent real number is created r+0i |
public static
|
#
createRational( integer|string|float $numerator, integer $denominator = 1 )
Create a Rational number |
public static
|
|
public static
|
TYPE_DEFAULT,
TYPE_GMP,
TYPE_NATIVE
|