Interface WFKeyValueBindingCreation

Description

Informal protocol for the Key Value Binding mechanism.

The default implementation of Key Value Binding is currently in WFWidget.

The only method subclasses are likely to need to overload is setupExposedBindings.

Located in /framework/WFKeyValueBindingCreation.php (line 18)


	
			
Method Summary
void bind (string $bindLocalProperty, object An $bindToObject, string $bindToKeyPath, [array $options = array()])
assoc_array exposedBindings ()
void unbind (string $bindLocalProperty)
Methods
bind (line 31)

Bind a property of the receiver's object to another object via KeyValueCoding

The default implementation of this function (presently in WFWidget) should be sufficient.

  • throws: If the receiver's property does not exist, or it is already bound.
void bind (string $bindLocalProperty, object An $bindToObject, string $bindToKeyPath, [array $options = array()])
  • string $bindLocalProperty: The name of the local property to bind.
  • object An $bindToObject: object to bind the property to.
  • string $bindToKeyPath: The keyPath on the object to bind the property to.
  • array $options: Options for the binding. exposedBindings
exposedBindings (line 55)

Get a list of all exposed bindings for this class, and the options for each binding.

Will call setupExposedBindings as a callback so subclasses can manifest all bindings options.

The default implementation of this function (presently in WFWidget) should be sufficient.

  • return: of WFBindingSetup objects, 'boundProperty' => WFBindingSetup object
assoc_array exposedBindings ()
setupExposedBindings (line 70)

Return an array of all bindings this object supports.

The default implementation in WFWidget has no bindings. This is a method many subclasses will overload.

Subclasses should call the parent, then add their own setups as needed. Example:

  1.       $bindings parent::setupExposedBindings();
  2.       $bindings[new WFBindingSetup('prop''Description of prop'$optionsArray);
  3.       return $bindings;

array setupExposedBindings ()
unbind (line 40)

Remove the binding for the passed property of the receiver.

The default implementation of this function (presently in WFWidget) should be sufficient.

  • throws: If the receiver's property is not bound.
void unbind (string $bindLocalProperty)
  • string $bindLocalProperty: The name of the local property to bind.

Documentation generated on Thu, 14 May 2009 16:20:08 -0400 by phpDocumentor 1.4.2