Class WFBinding

Description

The binding object.

The binding object encapsulates all information about a particular bound property of an object. These instances are created at runtime each time the bind function of the WFKeyValueBindingCreation protocol is used.

  • todo: Incorporate commonly used binding options here??? In addition to valueTransformer? I think I ended up putting a bunch in WFBindingSetup... coalesce?
  • todo: Does formatter need to assert for !readOnly? or MULTIVALUE? anything else? I think truly we only want to do it on multivalue bindings, b/c o/w you should just use the widget's formatter. Also, it should only work on read-only ones lest someone get the idea that it can go both ways. http://developer.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/Concepts/BindingsOptions.html

Located in /framework/WFBinding.php (line 271)

WFObject
   |
   --WFBinding
Class Constant Summary
Variable Summary
Method Summary
WFBinding __construct ()
string bindLocalProperty ()
void bindToKeyPath ()
void bindToObject ()
void formatter ()
void option ( $name)
void options ()
void setBindLocalProperty (string $localPropName)
void setBindToKeyPath ( $keyPath)
void setBindToObject ( $obj)
void setOption ( $name,  $value)
void setOptions ( $options)
Variables
object WFBindingSetup $bindingSetup (line 305)
  • var: A reference to the binding setup for this binding.
  • access: protected
string $bindLocalProperty (line 309)
  • var: The name of the local property of the object being bound.
  • access: protected
string $bindToKeyPath (line 289)
  • var: The keyPath on the $bindToObject that this binding is bound to.
  • access: protected
object The $bindToObject (line 285)
  • var: object that this property is bound to.
  • access: protected
assoc_array $options (line 300)
  • var: All of the various options that the binding supports. Each binding may have extra properties that it needs to know, and can be configured.
  • access: protected
boolean $raisesForNotApplicableKeys (line 294)
  • var: Should an exception be raised if the binding cannot be resolved? If false, the bindings system may log the exception.
  • access: protected
Methods
Constructor __construct (line 311)
WFBinding __construct ()

Redefinition of:
WFObject::__construct()
bindingSetup (line 329)

The WFBindingSetup object that this binding instance is for.

object WFBindingSetup bindingSetup ()
bindLocalProperty (line 352)

The property of the object that this binding applies to.

string bindLocalProperty ()
bindToKeyPath (line 372)
void bindToKeyPath ()
bindToObject (line 381)
void bindToObject ()
canReadBoundValue (line 429)
void canReadBoundValue ()
canWriteBoundValue (line 436)
void canWriteBoundValue ()
formatter (line 410)
void formatter ()
option (line 395)
void option ( $name)
  • $name
options (line 390)
void options ()
raisesForNotApplicableKeys (line 367)
void raisesForNotApplicableKeys ()
setBindingSetup (line 341)

Set the WFBindingSetup object that this binding instance is for.

In the case of Multi-Value bindings, each binding instance will point to the same "base" WFBindingSetup.

void setBindingSetup (object WFBindingSetup $bs)
setBindLocalProperty (line 362)

Set the property of the object that this binding applies to.

void setBindLocalProperty (string $localPropName)
  • string $localPropName
setBindToKeyPath (line 376)
void setBindToKeyPath ( $keyPath)
  • $keyPath
setBindToObject (line 385)
void setBindToObject ( $obj)
  • $obj
setOption (line 401)
void setOption ( $name,  $value)
  • $name
  • $value
setOptions (line 405)
void setOptions ( $options)
  • $options
valueTransformerName (line 444)
void valueTransformerName ()

Inherited Methods

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Class Constants
VALUE_FORMATTER_NAME = 'Formatter' (line 275)
VALUE_READ_WRITE_MODE = 'ReadWriteMode' (line 277)
VALUE_READ_WRITE_MODE_NORMAL = 'normal' (line 278)
VALUE_READ_WRITE_MODE_READ_ONLY = 'readonly' (line 280)
VALUE_READ_WRITE_MODE_WRITE_ONLY = 'writeonly' (line 279)
VALUE_TRANSFORMER_NAME = 'ValueTransformer' (line 274)

Documentation generated on Thu, 17 Apr 2008 13:51:32 -0400 by phpDocumentor 1.4.1