Class Xyster_Data_Binder

Description

A mediator that applies values to a target object

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

Located in /Data/Binder.php (line 28)


	
			
Direct descendents
Class Description
Xyster_Orm_Binder A binder for entities
Variable Summary
Method Summary
Xyster_Data_Binder __construct (object $target)
Xyster_Data_Binder addSetter (Xyster_Data_Binder_Setter_Interface $setter, [mixed $property = null])
void bind ( $values)
array getAllowedFields ()
object getTarget ()
boolean isAllowed (string $field)
Variables
mixed $_allowed = array() (line 32)
  • access: protected
Xyster_Data_Binder_Setter $_defaultSetter (line 41)
  • access: protected
mixed $_disallowed = array() (line 34)
  • access: protected
mixed $_setters = array() (line 36)
  • access: protected
mixed $_target (line 30)
  • access: protected
Methods
Constructor __construct (line 48)

Creates a new binder

  • access: public
Xyster_Data_Binder __construct (object $target)
  • object $target

Redefined in descendants as:
addSetter (line 67)

Adds a setter to handle a type and property

Setting the property argument to null will apply the setter to all fields

  • return: provides a fluent interface
  • access: public
Xyster_Data_Binder addSetter (Xyster_Data_Binder_Setter_Interface $setter, [mixed $property = null])
bind (line 82)

Binds the values in the array to the target

  • access: public
void bind ( $values)
  • array $values

Redefined in descendants as:
getAllowedFields (line 97)

Gets the allowed fields

  • access: public
array getAllowedFields ()
getDisallowedFields (line 107)

Gets the disallowed fields

  • access: public
array getDisallowedFields ()
getTarget (line 117)

Gets the target object

  • access: public
object getTarget ()
isAllowed (line 128)

Tests if a field is allowed

  • access: public
boolean isAllowed (string $field)
  • string $field

Redefined in descendants as:
setAllowedFields (line 140)

Sets the allowed fields

  • return: provides a fluent interface
  • access: public
Xyster_Data_Binder setAllowedFields ( $fields)
  • array $fields
setDisallowedFields (line 155)

Sets the disallowed fields

For security reasons, it is much more preferable to set the allowed fields explicitly using setAllowedFields.

  • return: provides a fluent interface
  • access: public
Xyster_Data_Binder setDisallowedFields ( $fields)
  • array $fields
_getSetter (line 168)

Gets a setter for the field supplied

  • access: protected
Xyster_Data_Binder_Setter_Interface _getSetter (string $field)
  • string $field: The field name

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