Properties is a mechanism for returning read-only data about an object. An object can have data associated with a PropertiesType. For each PropertiesType, there are Properties which are Serializable values identified by a key.
OSID Version: 2.0
Located in /harmoni/core/oki2/shared/HarmoniProperties.class.php (line 24)
Properties | --HarmoniProperties
Class | Description |
---|---|
ConfigurationProperties | Properties for configuring Managers |
NonReferenceProperties | Properties that can be added to without doing so by reference. Useful for building Properties of strings, integers, etc. |
Constructor. Create a new Properties object.
Add a Property to these Properties.
WARNING: NOT IN OSID - This method is not in the OSIDs as of version 2.0 Use at your own risk
Since PHP4's reference handling sucks royally and call-time-pass-by-reference currently throws errors since it is depricated, there is no way to pass objects as references and primatives by value to the same arguement. As such, in order to allow Properties to hold references to objects (such as in an Osid Context or Osid Configuration) the param-by reference must stay. To pass strings or other primatives you must set the primatives to variables first as in the following example:
$configuration = new HarmoniProperties(new ConfigurationPropertiesType); $configuration->addProperty('database_id', $arg1 = 0); $configuration->addProperty('authentication_table', $arg2 = 'auth_db_user'); $configuration->addProperty('username_field', $arg3 = 'username'); $configuration->addProperty('password_field', $arg4 = 'password'); unset($arg1, $arg2, $arg3, $arg4);
Remove a Property from these properties
WARNING: NOT IN OSID - This method is not in the OSIDs as of version 2.0 Use at your own risk
Get the Keys associated with these Properties.
Get the Property associated with this key.
Get the Type for this Properties instance.
Inherited From Properties
Properties::getKeys()
Properties::getProperty()
Properties::getType()
Documentation generated on Wed, 19 Sep 2007 10:24:10 -0400 by phpDocumentor 1.3.0RC3