Esempio n. 1
0
 * is used to define a global (with fully qualified name) 'registry' or
 * enumeration of all possible PHP datatypes: bool, int, string, array,
 * stdClass object, "typed" object (of a particular class or inheritance),
 * resource, null, closure, and function.
 * 
 * CHANGELOG
 * 
 * 1.0: Documented - May 3rd, 2013
 * 2.0: Refactored/relicensed into Primus - April 7th, 2015
 * 
 * @uses Falcraft\Data\Types\Enum for enumerator class generation
 * 
 * @version 2.0
 * 
 */
Enumeration::createEnumerator('Type', array('BASIC_BOOL' => 1, 'BASIC_INT' => 2, 'BASIC_STRING' => 3, 'BASIC_ARRAY' => 4, 'BASIC_OBJECT' => 5, 'TYPED_OBJECT' => 6, 'BASIC_RESOURCE' => 7, 'BASIC_NULL' => 8, 'BASIC_CLOSURE' => 9, 'BASIC_FUNCTION' => 10), array('namespace' => 'Falcraft\\Data\\Types'));
/**
 * Falcraft Libraries Data Types "Type" Namespace
 * 
 * Contains the two global utility functions under the Type namespace (same as 
 * the enum above, and actually the same as the fully qualified generated class 
 * name).  These functions support "type" conversion and generation from values 
 * and strings.  Useful in the Restrictions.php
 * 
 */
namespace Falcraft\Data\Types\Type;

// Use the above enumerator generator namespace
use Falcraft\Data\Types;
/**
 * Generates an enumerated Type representative value from a given variable