Class SObject

Description

SObject (Squeak/Smalltalk-like object).

In Smalltalk, all object share a common class, "Object", which defines common methods for all objects. This class holds a subset of those methods in Object that are needed in this package.

Located in /harmoni/core/Primitives/Objects/SObject.class.php (line 33)


	
			
Direct descendents
Class Description
EventTrigger The event trigger is an abstract class which handles the aggregation of EventListeners and can trigger events.
URLWriter The purpose of a URLWriter is to generate URLs from contextual data. This data would be the current/target module and action, any contextual name=value pairs specified by the code, and any additional query data.
Schema Holds the descriptive information about a specific OKI-style DataManager Schema. Schemas define the fields available in a Record, the number of values allowed in that field.
QueryAbstract A generic Query interface to be implemented by all Query objects.
HarmoniIterator A class for passing an arbitrary input array as an iterator.
StringParser StringParser and its decendent classes form a Strategy pattern. They classes that each implement a differnt method (strategy) for parsing strings into dates and times.
TimeZone TimeZone is a simple class to colect the information identifying a UTC time zone.
String A simple String data type.
Magnitude Magnitude has methods for dealing with linearly ordered collections.
Boolean A simple Boolean data type.
OrderedSet The OrderedSet provides an easy way to manage a group of Ids.
Type The Type class captures the fundamental concept of categorizing an object.
WizardComponent A WizardComponent is an element that you can add to a Wizard. They can be used to create simple interface components or to handle form input and validation.
Method Summary
object asA (string $aSimilarClass)
string asString ()
object copy ()
void copySameFrom (object $otherObject)
object copyTwoLevel ()
object deepCopy ()
boolean isEqual (object $anObject)
boolean isEqualTo (object $anObject)
boolean isNotEqualTo (object $anObject)
boolean isNotReferenceTo (object $anObject)
boolean isReferenceTo (object $anObject)
object newFrom (string $targetClass, object $aSimilarObject)
object postCopy ()
string printableString ()
object shallowCopy ()
array, _deepCopyArray (array, $array)
Methods
asA (line 156)

Create an object of class aSimilarClass that has similar contents to the receiver.

'as' seems to be a reserved word, so 'asA' is used instead.

  • since: 5/5/05
  • access: public
object asA (string $aSimilarClass)
  • string $aSimilarClass
asString (line 169)

Answer a String whose characters are a description of the receiver.

To change behavior, override printableString(), not this method.

  • since: 7/11/05
  • access: public
string asString ()

Redefined in descendants as:
copy (line 206)

Answer another instance just like the receiver. Subclasses typically override postCopy; they typically do not override shallowCopy.

  • since: 7/11/05
  • access: public
object copy ()
copySameFrom (line 220)

Copy to myself all instance variables named the same in otherObject.

This ignores otherObject's control over its own inst vars.

  • since: 5/5/05
  • access: public
void copySameFrom (object $otherObject)
  • object $otherObject
copyTwoLevel (line 237)

one more level than a shallowCopy

  • since: 7/11/05
  • access: public
object copyTwoLevel ()
deepCopy (line 267)

Answer a copy of the receiver with its own copy of each instance variable.

  • since: 7/11/05
  • access: public
object deepCopy ()

Redefined in descendants as:
isEqual (line 90)

Answer whether the receiver and the argument are the same.

WARNING: This method is here for convience. DO NOT OVERRIDE. OVERRIDE isEqualTo() instead.

  • since: 7/11/05
  • access: public
boolean isEqual (object $anObject)
  • object $anObject

Redefined in descendants as:
isEqualTo (line 75)

Answer whether the receiver and the argument are the same.

If = is redefined in any subclass, consider also redefining the message hash.

  • since: 7/11/05
  • access: public
boolean isEqualTo (object $anObject)
  • object $anObject

Redefined in descendants as:
isNotEqualTo (line 103)

Answer whether the receiver and the argument are not the same.

  • since: 7/11/05
  • access: public
boolean isNotEqualTo (object $anObject)
  • object $anObject
isNotReferenceTo (line 137)

Answer whether the receiver and the argument do not reference the same object.

  • since: 7/11/05
  • access: public
boolean isNotReferenceTo (object $anObject)
  • object $anObject
isReferenceTo (line 115)

Answer whether the receiver and the argument Reference the same object.

  • since: 7/11/05
  • access: public
boolean isReferenceTo (object $anObject)
  • object $anObject
newFrom (line 55)

Create an object that has similar contents to aSimilarObject.

If the classes have any instance varaibles with the same names, copy them across. If this is bad for a class, override this method.

  • since: 5/5/05
  • static:
  • access: public
object newFrom (string $targetClass, object $aSimilarObject)
  • string $targetClass: As mentiond here, http://www.php.net/manual/en/ref.classobj.php there is no good way to inherit class methods such that they can know the class of the reciever (child class) instead of the class name of the implementer (parent class). As such, we need to pass our target classname.
  • object $aSimilarObject
postCopy (line 336)

$this is a shallow copy, subclasses should override to copy fields as necessary to complete the full copy.

  • since: 7/11/05
  • access: public
object postCopy ()

Redefined in descendants as:
printableString (line 181)

Answer a String whose characters are a description of the receiver.

Override this method as needed to provide a better representation

  • since: 7/11/05
  • access: public
string printableString ()

Redefined in descendants as:
shallowCopy (line 348)

Answer a copy of the receiver which shares the receiver's instance variables.

  • since: 7/11/05
  • access: public
object shallowCopy ()
_deepCopyArray (line 303)

Recursively copy an array, used by deepCopy

  • return: a deep copy of the input array
  • static:
  • since: 7/12/05
  • access: private
array, _deepCopyArray (array, $array)
  • array, $array: the input array.

Documentation generated on Wed, 19 Sep 2007 10:26:36 -0400 by phpDocumentor 1.3.0RC3