Open Journal Systems  3.3.0
PrimitiveTypeDescription Class Reference
Inheritance diagram for PrimitiveTypeDescription:
TypeDescription ValidatorTypeDescription

Public Member Functions

 __construct ($typeName)
 
 _getPrimitiveTypeName (&$variable)
 
 checkType (&$object)
 
 getNamespace ()
 
 parseTypeName ($typeName)
 
- Public Member Functions inherited from TypeDescription
 _parseTypeNameInternally ($typeName)
 
 getTypeDescription ()
 
 getTypeName ()
 
 isCompatible ($object)
 

Static Public Member Functions

static _supportedPrimitiveTypes ()
 

Data Fields

 $_primitiveType
 
- Data Fields inherited from TypeDescription
 $_cardinality
 
 $_typeName
 

Detailed Description

Class that describes a primitive input/output type.

Definition at line 18 of file PrimitiveTypeDescription.inc.php.

Constructor & Destructor Documentation

◆ __construct()

PrimitiveTypeDescription::__construct (   $typeName)

Constructor

Parameters
$typeNamestring Allowed primitive types are 'integer', 'string', 'float' and 'boolean'.

Reimplemented from TypeDescription.

Reimplemented in ValidatorTypeDescription.

Definition at line 31 of file PrimitiveTypeDescription.inc.php.

Member Function Documentation

◆ _getPrimitiveTypeName()

PrimitiveTypeDescription::_getPrimitiveTypeName ( $variable)

Return a string representation of a primitive type.

Parameters
$variablemixed

Definition at line 82 of file PrimitiveTypeDescription.inc.php.

Referenced by checkType().

◆ _supportedPrimitiveTypes()

static PrimitiveTypeDescription::_supportedPrimitiveTypes ( )
static

Returns a (static) array with supported primitive type names.

Definition at line 96 of file PrimitiveTypeDescription.inc.php.

Referenced by parseTypeName().

◆ checkType()

PrimitiveTypeDescription::checkType ( $object)
See also
TypeDescription::checkType()

Reimplemented from TypeDescription.

Reimplemented in ValidatorTypeDescription.

Definition at line 64 of file PrimitiveTypeDescription.inc.php.

References _getPrimitiveTypeName().

◆ getNamespace()

PrimitiveTypeDescription::getNamespace ( )
See also
TypeDescription::getNamespace()

Reimplemented from TypeDescription.

Reimplemented in ValidatorTypeDescription.

Definition at line 42 of file PrimitiveTypeDescription.inc.php.

◆ parseTypeName()

PrimitiveTypeDescription::parseTypeName (   $typeName)
See also
TypeDescription::parseTypeName()

Reimplemented from TypeDescription.

Reimplemented in ValidatorTypeDescription.

Definition at line 53 of file PrimitiveTypeDescription.inc.php.

References _supportedPrimitiveTypes().

Field Documentation

◆ $_primitiveType

string PrimitiveTypeDescription::$_primitiveType

a PHP primitive type, e.g. 'string'

Definition at line 23 of file PrimitiveTypeDescription.inc.php.


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