|
|
|
|
This interface describes the methods that all HammerKit_ObjectInterface classes have to implement.
HammerKit_Object add(mixed[] attributes)
Description: Add a new object to the database.
Attributes: attributes is a list of attributes and their values for the object to be created.
Returns: An object of the class.
boolean exists(integer id)
Description: Check if an object exists with a specific id.
Arguments: id is the database identifier of the object
Returns: TRUE if the object exista, FALSE otherwise
string getAttribute(string attribute [, boolean formatted [, array formatOptions]])
Description: Gets the value of an object's attribute.
Arguments: attribute is the name of an object attribute, formatted, format_options
Returns: the value of the attribute and FALSE if the given attribute is invalid
array getAttributeList([string property])
Description: Returns an array describing all the possible attributes for an object.
Arguments: property defines the attribute property to return a list of - default value is an empty string which returns an array of all properties
Returns: the array of attributes where the keys are the attribute names and the values are arrays containing the properties of the attributes
string getChooser(string name [, string value [, array specials [, array settings [, array options]]]])
Description: This method is an alias for the chooser function for the corresponding class, for further information see the description of the chooser functions.
object getInstance(mixed id)
Description: This method is used to instantiate objects that implement this interface. Objects of classes implementing this interface cannot be instantiated by using the new keyword.
HammerKit_ObjectList getList([array where])
Description: Get an unsorted list of objects that match the criteria in the where argument. The method returns only objects to which the user has at least read rights.
Arguments:
Returns: The method returns a HammerKit_ObjectList object containing the found objects.
array getListByAttribute([string attribute_name [, mixed attribute_value [, string comparison]]])
Description:
Arguments:
Returns:
boolean remove(void)
Description: Removes an object from the database.
Returns: TRUE on success and FALSE otherwise
boolean setAttribute(string attributeName, mixed attributeValue)
Description: Sets the value of a settable object attribute.
Arguments: attribute_name is the name of an attribute, attribute_value is the value of the attribute to be set.
Returns: TRUE on success and FALSE otherwise.
boolean setAttributes(array attributes)
Description: Sets the values of settable object attributes.
Arguments: attributes is an array where the kays are valid object attribute names and the values are the corresponding values of the attributes
Returns: TRUE on success and FALSE otherwise
string toXml(void)
Description: Get an XML serialization of the object.
Returns: An XML string where the object element is the root element.
|
� HammerKit Oy 2008 |
UPDATED: 14.05.2009 14:59 |
|