PHP Class Pinq\Analysis\PhpTypeSystem

Author: Elliot Levin ([email protected])
Inheritance: extends TypeSystem
Show file Open project: timetoogo/pinq

Protected Properties

Property Type Description
$classTypeMap array[]
$functionTypeMap string[]
$typeDataModules Pinq\Analysis\TypeData\ITypeDataModule[]

Public Methods

Method Description
__construct ( array $customTypeDataModules = [] )
getCommonAncestorType ( Pinq\Analysis\IType $type, Pinq\Analysis\IType $otherType )
getTypeDataModules ( ) : Pinq\Analysis\TypeData\ITypeDataModule[] Gets the type data modules from the type system.
getTypeFromTypeHint ( $typeHint )
getTypeFromValue ( $value )
registerTypeDataModule ( Pinq\Analysis\TypeData\ITypeDataModule $module ) : void Adds the type data module to the type system.

Protected Methods

Method Description
binaryOperations ( )
bitwiseOperators ( $operator )
booleanOperator ( $operator )
buildCompositeType ( $typeId, array $types )
buildFunction ( $name )
buildObjectType ( $typeId, $classType )
commonNativeUnaryOperations ( )
getAncestorTypes ( Pinq\Analysis\IType $type )
getObjectTypeData ( $classType )
mathOperators ( $operator, $otherIntReturnType = INativeType::TYPE_INT )
nativeCasts ( )
nativeType ( $typeOfType, Pinq\Analysis\IType $parentType, Pinq\Analysis\IIndexer $indexer = null, array $unaryOperatorMap = [], array $castMap = [] )
nativeTypes ( )
normalizeClassName ( $name ) such as 'money_format' which will fail with reflection if not available.
normalizeFunctionName ( $name )
objectCasts ( $objectTypeId )
objectUnaryOperations ( $objectTypeId )
typeDataModules ( ) : Pinq\Analysis\TypeData\ITypeDataModule[]

Method Details

__construct() public method

public __construct ( array $customTypeDataModules = [] )
$customTypeDataModules array

binaryOperations() protected method

protected binaryOperations ( )

bitwiseOperators() protected method

protected bitwiseOperators ( $operator )

booleanOperator() protected method

protected booleanOperator ( $operator )

buildCompositeType() protected method

protected buildCompositeType ( $typeId, array $types )
$types array

buildFunction() protected method

protected buildFunction ( $name )

buildObjectType() protected method

protected buildObjectType ( $typeId, $classType )

commonNativeUnaryOperations() protected method

getAncestorTypes() protected method

protected getAncestorTypes ( Pinq\Analysis\IType $type )
$type Pinq\Analysis\IType

getCommonAncestorType() public method

public getCommonAncestorType ( Pinq\Analysis\IType $type, Pinq\Analysis\IType $otherType )
$type Pinq\Analysis\IType
$otherType Pinq\Analysis\IType

getObjectTypeData() protected method

protected getObjectTypeData ( $classType )

getTypeDataModules() public method

Gets the type data modules from the type system.
public getTypeDataModules ( ) : Pinq\Analysis\TypeData\ITypeDataModule[]
return Pinq\Analysis\TypeData\ITypeDataModule[]

getTypeFromTypeHint() public method

public getTypeFromTypeHint ( $typeHint )

getTypeFromValue() public method

public getTypeFromValue ( $value )

mathOperators() protected method

protected mathOperators ( $operator, $otherIntReturnType = INativeType::TYPE_INT )

nativeCasts() protected method

protected nativeCasts ( )

nativeType() protected method

protected nativeType ( $typeOfType, Pinq\Analysis\IType $parentType, Pinq\Analysis\IIndexer $indexer = null, array $unaryOperatorMap = [], array $castMap = [] )
$parentType Pinq\Analysis\IType
$indexer Pinq\Analysis\IIndexer
$unaryOperatorMap array
$castMap array

nativeTypes() protected method

protected nativeTypes ( )

normalizeClassName() protected method

such as 'money_format' which will fail with reflection if not available.
protected normalizeClassName ( $name )

normalizeFunctionName() protected method

protected normalizeFunctionName ( $name )

objectCasts() protected method

protected objectCasts ( $objectTypeId )

objectUnaryOperations() protected method

protected objectUnaryOperations ( $objectTypeId )

registerTypeDataModule() public method

Adds the type data module to the type system.
public registerTypeDataModule ( Pinq\Analysis\TypeData\ITypeDataModule $module ) : void
$module Pinq\Analysis\TypeData\ITypeDataModule
return void

typeDataModules() protected method

protected typeDataModules ( ) : Pinq\Analysis\TypeData\ITypeDataModule[]
return Pinq\Analysis\TypeData\ITypeDataModule[]

Property Details

$classTypeMap protected property

protected array[] $classTypeMap
return array[]

$functionTypeMap protected property

protected string[] $functionTypeMap
return string[]

$typeDataModules protected property

protected ITypeDataModule[],Pinq\Analysis\TypeData $typeDataModules
return Pinq\Analysis\TypeData\ITypeDataModule[]