PHP Class PDepend\Util\Type

Datei anzeigen Open project: horde/horde Class Usage Examples

Public Methods

Method Description
getInternalNamespaces ( ) : array(string) Returns an array with all package/extension names.
getPrimitiveType ( string $image ) : string This method will return a unified type image for a detected source type image.
getTypePackage ( string $typeName ) : string Returns the package/extension for the given type name. If no package exists, this method will return null.
isArrayType ( string $image ) : boolean This method will return true when the given image describes a php array type.
isInternalPackage ( string $packageName ) : boolean This method will return true when the given package represents a php extension.
isInternalType ( string $typeName ) : boolean Returns true if the given type is internal or part of an extension.
isPrimitiveType ( string $image ) : boolean This method will return true when the given type identifier is in the list of primitive types.
isScalarType ( string $image ) : boolean This method will return true when the given type identifier is in the list of scalar/none-object types.

Private Methods

Method Description
initTypeToExtension ( ) : array(string=>string) This method reads all available classes and interfaces and checks whether this type belongs to an extension or is internal. All internal and extension classes are collected in an internal data structure.

Method Details

getInternalNamespaces() public static method

Returns an array with all package/extension names.
public static getInternalNamespaces ( ) : array(string)
return array(string)

getPrimitiveType() public static method

This method will return a unified type image for a detected source type image.
Since: 0.9.6
public static getPrimitiveType ( string $image ) : string
$image string The found primitive type image.
return string

getTypePackage() public static method

Returns the package/extension for the given type name. If no package exists, this method will return null.
public static getTypePackage ( string $typeName ) : string
$typeName string The type name.
return string

isArrayType() public static method

This method will return true when the given image describes a php array type.
Since: 0.9.6
public static isArrayType ( string $image ) : boolean
$image string The found type image.
return boolean

isInternalPackage() public static method

This method will return true when the given package represents a php extension.
public static isInternalPackage ( string $packageName ) : boolean
$packageName string Name of a package.
return boolean

isInternalType() public static method

Returns true if the given type is internal or part of an extension.
public static isInternalType ( string $typeName ) : boolean
$typeName string The type name.
return boolean

isPrimitiveType() public static method

This method will return true when the given type identifier is in the list of primitive types.
Since: 0.9.6
public static isPrimitiveType ( string $image ) : boolean
$image string The type image.
return boolean

isScalarType() public static method

This method will return true when the given type identifier is in the list of scalar/none-object types.
public static isScalarType ( string $image ) : boolean
$image string The type identifier.
return boolean