Class WFObjectController

Description

The main ObjectController from the Controller Layer.

  • see: WFKeyValueCoding
  • see: WFKeyValueBindingCreation The WFObjectController provides a controller-layer compatible container for a single object. The following are legitimate Controller Keys for this controller: selection selectedObjects isEditable UNIMPLEMENTED canAdd UNIMPLEMENTED canRemove UNIMPLEMENTED The following properties of the WFObjectController can be bound: content editable UNIMPLEMENTED
  • todo: Upgrade to cocoa-compatible defaults automaticallyPreparesContent FALSE --> BC-breaking CHANGE; will require testing all apps that use it avoidsEmptySelection TRUE selectsInsertedObjects TRUE (not yet implemented) editable TRUE preservesSelection TRUE

Located in /framework/WFObjectController.php (line 38)

WFObject
   |
   --WFObjectController
Direct descendents
Class Description
WFArrayController The ArrayController class.
Variable Summary
string $class
object The $content
Method Summary
WFObjectController __construct ()
void content ()
void prepareContent ()
void selection ()
void setClass ( $class)
void setContent (object The $obj)
Variables
boolean $automaticallyPreparesContent (line 51)
  • var: Does the controller create an instance of the controller class type if there is not one already?
  • access: protected
string $class (line 47)
  • var: The class name of the content.
  • access: protected
object The $content (line 43)
  • var: object being managed by this controller instance.
  • access: protected
Methods
Constructor __construct (line 53)
WFObjectController __construct ()

Redefinition of:
WFObject::__construct()

Redefined in descendants as:
content (line 117)
void content ()
prepareContent (line 70)

Prepare the controller's content.

Basically, this will make sure that an instance exists. If one doesn't, a new instance of the class will be created and used as the content.

  • access: protected
void prepareContent ()

Redefined in descendants as:
selectedObjects (line 98)

Get an array with the selected objects.

  • return: array containing the selected objects, or an empty array if there is no selection.
An selectedObjects ()

Redefined in descendants as:
selection (line 111)
void selection ()

Redefined in descendants as:
setAutomaticallyPreparesContent (line 124)
void setAutomaticallyPreparesContent ( $prepare)
  • $prepare
setClass (line 61)
void setClass ( $class)
  • $class
setContent (line 88)

Set the content managed by this controller instance.

If there already is a content, this will replace it.

void setContent (object The $obj)
  • object The $obj: object to manage. This must be a WFObject subclass, or potentially another object that implements Key-Value Coding.

Redefined in descendants as:

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()

Documentation generated on Thu, 07 Aug 2008 10:36:52 -0400 by phpDocumentor 1.4.1