Class Xyster_Type

Description

Type wrapper class

  • copyright: Copyright (c) 2007-2008 Irrational Logic (http://irrationallogic.net)
  • license: New BSD License

Located in /Type.php (line 24)


	
			
Direct descendents
Class Description
Xyster_Orm_Entity_Type A helper for meta information about entities
Variable Summary
ReflectionClass $_class
mixed $_type
Method Summary
static boolean areDeeplyEqual (mixed $arg1, mixed $arg2)
static boolean areEqual (mixed $arg1, mixed $arg2)
static array getForParameters ( $function)
static int hash (mixed $value)
static Xyster_Type of (mixed $value)
static ReflectionClass _getReflectionClass (string $name)
Xyster_Type __construct (string $type)
boolean equals (mixed $object)
ReflectionClass getClass ()
string getName ()
int hashCode ()
void isAssignableFrom (mixed $type)
boolean isInstance (mixed $value)
boolean isObject ()
string __toString ()
Variables
ReflectionClass $_class (line 41)
  • access: protected
mixed $_type (line 36)
  • access: protected
Methods
static method areDeeplyEqual (line 225)

Compares two values for equality

If two objects are not identical (that is, are exactly the same instance) they will be compared property-by-property recursively if need be. This method will not nest any deeper than 10 levels to compare objects.

Arrays will be compared in the same manner.

If the object you supply for $arg1 has a method named 'equals', that method will be called using $arg2 for the argument.

  • access: public
static boolean areDeeplyEqual (mixed $arg1, mixed $arg2)
  • mixed $arg1
  • mixed $arg2
static method areEqual (line 178)

Checks for shallow equality

If the object you supply for $arg1 has a method named 'equals', that method will be called using $arg2 for the argument.

  • access: public
static boolean areEqual (mixed $arg1, mixed $arg2)
  • mixed $arg1
  • mixed $arg2
static method getForParameters (line 236)

Gets the types of the parameters for a function or method

  • access: public
static array getForParameters ( $function)
  • ReflectionFunctionAbstract $function
static method hash (line 274)

Gets the Java-style hash code of a value

If you supply an object for the argument and it has a method named 'hashCode', that method will be called.

  • access: public
static int hash (mixed $value)
  • mixed $value
static method of (line 260)

Gets the type of the value supplied

  • access: public
static Xyster_Type of (mixed $value)
  • mixed $value
static method _getReflectionClass (line 379)

Gets the ReflectionClass for a class name and stores it

  • access: protected
static ReflectionClass _getReflectionClass (string $name)
  • string $name
Constructor __construct (line 48)

Creates a new type representation

  • access: public
Xyster_Type __construct (string $type)
  • string $type

Redefined in descendants as:
equals (line 69)

Tests another value for equality

  • access: public
boolean equals (mixed $object)
  • mixed $object
getClass (line 80)

If this type is a class this returns the ReflectionClass object for it

  • access: public
ReflectionClass getClass ()
getName (line 90)

Gets the name of this type

  • access: public
string getName ()
hashCode (line 100)

Gets a hash code for this type

  • access: public
int hashCode ()
isAssignableFrom (line 113)

Determines if the supplied type is a child of the current type

The $type argument can be either a string, a ReflectionClass object or a Xyster_Type object

  • access: public
void isAssignableFrom (mixed $type)
  • mixed $type
isInstance (line 142)

Determines if the value supplied is an instance of this type

  • access: public
boolean isInstance (mixed $value)
  • mixed $value
isObject (line 153)

Gets whether this type is an object type

  • access: public
boolean isObject ()
__toString (line 163)

Gets the string representation of this object

  • access: public
string __toString ()

Documentation generated on Mon, 19 May 2008 17:07:43 -0400 by phpDocumentor 1.4.2