Manual and Documentation

NOTE: This manual describes HammerKit version 3.5. To view documentation for the current release of HammerKit Studio, please go to http://manual.hammerkit.com/
search
Index / D. Object API / Classes / HammerKit_GenericObject

A. Introduction
B. Installation and Configuration
C. Using HammerKit tools
D. Object API
Classes
Button
FileUtils
HammerKit_BasicFile
HammerKit_Color
HammerKit_ColorPalette
HammerKit_Component
HammerKit_Converter
HammerKit_CssRule
HammerKit_Db
HammerKit_DbQueryResult
HammerKit_Document
HammerKit_Element
HammerKit_File
HammerKit_GenericObject
HammerKit_Image
HammerKit_Keyword
HammerKit_ObjectCache
HammerKit_ObjectList
HammerKit_Session
HammerKit_Shortcut
HammerKit_Site
HammerKit_System
HammerKit_User
HammerKit_UserGroup
HammerKit_VariableHandler
Style
Interfaces
Object Choosers
Global Variables
Modules
Tools
Converters
Using the API
E. HammerScript
F. Access Rights
HammerKit_GenericObject


Implements interface: HammerKit_ObjectInterface

A HammerKit_GenericObject is basically an associative array implementing the HammerKit_ObjectInterface. The HammerKit_GenericObject class has no predefined attributes and attributes can be freely added and removed from the object through the methods setAttribute and setAttributes.

A HammerKit_GenericObject only exists during run-time and thus has no id-type identifier for database persistence. In stead the identifier of a HammerKit_GenericObject is the associative array of predefined attributes to be "converted" into a object implementing the HammerKit_ObjectInterface.




Attributes

A HammerKit_GenericObject does not have any predefined attributes.

Methods

constructor __construct([array attributes])
Description: Creates a new HammerKit_GenericObject object.
Arguments: attributes is an associative array with attribute names as keys and attribute values as value.

mixed getAttribute(string attribute [, boolean formatted [, array format_options]])
Description: See the description of the HammerKit_ObjectInterface interface.

string[string[]] getAttributeList([string property])
Description: See the description of the HammerKit_ObjectInterface interface.

string getChooser(string name [, string value [, array specials [, array settings [, array options]]]])
Description: See the description of the HammerKit_ObjectInterface interface.

boolean remove(void)
Description: See the description of the HammerKit_ObjectInterface interface.
Note: In the case of a HammerKit_GenericObject, this method only removes all the attributes specified in the object.

boolean setAttribute(string attribute_name, mixed attribute_value)
Description: See the description of the HammerKit_ObjectInterface interface.

boolean setAttributes(array attributes)
Description: See the description of the HammerKit_ObjectInterface interface.

mixed[] toArray(void)
Description: Converts the HammerKit_GenericObject to an associative array.
Returns: The object's attributes and their values as an array.


� HammerKit Oy 2008 UPDATED: 09.12.2008 14:59