Class Xyster_Orm_Entity_Lookup_Enum

Description

Property lookups for enum values

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

Located in /Orm/Entity/Lookup/Enum.php (line 32)

Xyster_Orm_Entity_Lookup_Abstract
   |
   --Xyster_Orm_Entity_Lookup_Enum
Variable Summary
Method Summary
Xyster_Orm_Entity_Lookup_Enum __construct (Xyster_Orm_Entity_Type $type,  $enum, string $field, [string $value = true], [string $name = null])
mixed get (Xyster_Orm_Entity $entity)
void set (Xyster_Orm_Entity $entity, mixed $value)
Variables
string $_field (line 38)

The entity field name to use for the lookup

  • access: protected
Xyster_Type $_type (line 49)
  • access: protected
boolean $_value = true (line 44)

True to use the value, false to use the name

  • access: protected
Methods
Constructor __construct (line 65)

Creates a new enum lookup

The default field name for this lookup will be the field name provided appended with 'Type' (ex. 'status' will yield 'statusType'). This field name should not already exist.

  • throws: Xyster_Orm_Entity_Exception if the type provided for $enum isn't a subclass of Xyster_Enum
  • access: public
Xyster_Orm_Entity_Lookup_Enum __construct (Xyster_Orm_Entity_Type $type,  $enum, string $field, [string $value = true], [string $name = null])
  • Xyster_Orm_Entity_Type $type: The entity type supported
  • Xyster_Type $enum: The enum type to generate
  • string $field: The name of the field on the entity
  • string $value: True to use the value of the enum, false to use the name
  • string $name: Optional. The name of this lookup field

Redefinition of:
Xyster_Orm_Entity_Lookup_Abstract::__construct()
Creates a new lookup
get (line 95)

Gets the lookup value for the entity given

  • return: The lookup value or object
  • access: public
mixed get (Xyster_Orm_Entity $entity)
getType (line 84)

Gets the type of object or value returned by this lookup

  • return: The value type
  • access: public
Xyster_Type getType ()
set (line 117)

Sets any fields affected by changing the value of this lookup

  • throws: Xyster_Orm_Entity_Exception if the value is invalid
  • access: public
void set (Xyster_Orm_Entity $entity, mixed $value)

Inherited Methods

Inherited From Xyster_Orm_Entity_Lookup_Abstract

Xyster_Orm_Entity_Lookup_Abstract::__construct()
Xyster_Orm_Entity_Lookup_Abstract::getEntityType()
Xyster_Orm_Entity_Lookup_Abstract::getName()
Xyster_Orm_Entity_Lookup_Abstract::_checkEntity()
Xyster_Orm_Entity_Lookup_Abstract::_checkSet()

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