Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcReflectionTypeMapper

Reflection::ezcReflectionTypeMapper

Class ezcReflectionTypeMapper

Provides mapping from type names used in documentation to standardized type names

Source for this file: /Reflection/src/type_mapper.php

Version:   //autogen//

Constants

CANONICAL_NAME_ARRAY = 'array'
CANONICAL_NAME_BOOLEAN = 'boolean'
CANONICAL_NAME_CALLBACK = 'callback'
CANONICAL_NAME_FLOAT = 'float'
CANONICAL_NAME_INTEGER = 'integer'
CANONICAL_NAME_MIXED = 'mixed'
CANONICAL_NAME_NULL = 'NULL'
CANONICAL_NAME_NUMBER = 'number'
CANONICAL_NAME_OBJECT = 'object'
CANONICAL_NAME_RESOURCE = 'resource'
CANONICAL_NAME_STRING = 'string'
REGEXP_TYPE_NAME_LIST = '/^(.+)\[\]$/'
REGEXP_TYPE_NAME_MAP = '/^array\s*\((\S+?)=>(\S+)\)$/'

Member Variables

protected array $mappingTable
protected array $xmlMappingTable

Method Summary

public static ezcReflectionTypeMapper getInstance( )
public string getTypeName( $typeName )
Maps a type to a canonical type name
public string getXmlType( $typeName )
Maps a typename to the name of the correspondent XML Schema datatype
protected void initMappingTable( )
public boolean isArray( $typeName )
Test whether the given type is an array or hash map
public boolean isMixed( $typeName )
Tests whether the given type is described as mixed, number, or callback.
public Boolean isScalarType( $typeName )
Tests whether the given type is a scalar type.
public Boolean isSpecialType( $typeName )
Tests whether the given type is a special type.

Methods

getInstance

static ezcReflectionTypeMapper getInstance( )

getTypeName

string getTypeName( string $typeName )

Maps a type to a canonical type name

Parameters:
Name Type Description
$typeName string

getXmlType

string getXmlType( string $typeName )

Maps a typename to the name of the correspondent XML Schema datatype

Parameters:
Name Type Description
$typeName string

initMappingTable

void initMappingTable( )

isArray

boolean isArray( string $typeName )

Test whether the given type is an array or hash map

Parameters:
Name Type Description
$typeName string

isMixed

boolean isMixed( string $typeName )

Tests whether the given type is described as mixed, number, or callback.

Parameters:
Name Type Description
$typeName string

isScalarType

Boolean isScalarType( String $typeName )

Tests whether the given type is a scalar type.

The types integer, float, string, and boolean are considered to be scalar.

The types array, object, resource, NULL, mixed, number, and callback are not scalar.

Parameters:
Name Type Description
$typeName String

isSpecialType

Boolean isSpecialType( String $typeName )

Tests whether the given type is a special type.

Only the types NULL and resource are considered to be special types.

Parameters:
Name Type Description
$typeName String
Documentation generated by phpDocumentor 1.4.3