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_ObjectList

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_ObjectList


Implements interfaces: HammerKit_ObjectInterface, Countable, Traversable, ArrayAccess





Attributes

integer current_index
Description: The index of the current list element. The index of the first element id 0.
Settable: no

object current_object
Description: The element that the internal pointer of the list currently points to.
Settable: no

string current_value
Description: The identifier of the current object.
Settable: no

integer size
Description: The number of elements in the list.
Settable: no

string type
Description: The type of the elements in the list. In case of objects the class name, like Component or File.
Settable: no

Methods

constructor __construct(string class_name [, array identifier_list ])
Description: Creates a HammerKit_ObjectList object
Arguments: class_name is the name of the class of the objects, identifier_list is the list of identifiers for the objects to create a list of

boolean contains(integer identifier)
Description: Checks if the list contains an identifier
Arguments: identifier is the identifier of the object to test
Returns: TRUE if the list contains the identifier, otherwise FALSE

HammerKit_ObjectList diff(HammerKit_ObjectList list)
Description: Combines two HammerKit_ObjectList objects of the same types so that the resulting list contains all the objects that are not present in both object lists.
Arguments: list is an object list to combine with the current object list
Returns: The combined object list or FALSE on failure

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

array getAttributeList([string parameter])
Description: see the description of the HammerKit_ObjectInterface interface

string getClassName(void)
Description: Get the name of the class of the elements in the list. Same as the attribute type
Returns: The name of the class

integer getCurrentIndex(void)
Description: Get the current index the list points to. Same as the attribute current_index
Returns: The current index number

mixed getNext([boolean as_object])
Description: Get the next element in the list as an identifier or an object and advance the internal pointer by one
Arguments: as_object defaults to false
Returns: If as_object is TRUE then an object is returned, otherwise the identifier of the object is returned

object getNextObject(void)
Description:
Returns:

integer getNextValue(void)
Description:
Returns:

object getObjectAt(integer index_nr)
Description:
Arguments:
Returns:

integer getValueAt(integer index_nr)
Description:
Arguments:
Returns:

boolean hasNext(void)
Description:
Returns:

HammerKit_ObjectList intersect(HammerKit_ObjectList list)
Description:
Arguments:
Returns:

HammerKit_ObjectList merge(HammerKit_ObjectList list)
Description:
Arguments:
Returns:

boolean reset([integer index_nr])
Description:
Arguments:
Returns:

boolean reverse(void)
Description:
Arguments:
Returns:

integer size(void)
Description:
Returns:

boolean sort(string sort_by [, boolean reverse_order ])
Description:
Arguments:
Returns:

array toArray(void)
Description:
Returns:


� HammerKit Oy 2008 UPDATED: 12.12.2008 14:35