Ryzom Account Management System  1.0
Static Public Member Functions
Gui_Elements Class Reference

Helper class for generating gui related elements. More...

Static Public Member Functions

static make_table ($inputList, $funcArray, $fieldArray)
 creates an array of information out of a list of objects which can be used to form a table.
static make_table_with_key_is_id ($inputList, $funcArray, $idFunction)
 creates an array of information out of a list of objects which can be used to form a table with a key as id.
static time_elapsed_string ($ptime)
 returns the elapsed time from a timestamp up till now.

Detailed Description

Helper class for generating gui related elements.

This class contains functions that generate data-arrays for tables, or other visual entities

Author:
Daan Janssens, mentored by Matthew Lagoe

Member Function Documentation

static make_table ( inputList,
funcArray,
fieldArray 
) [static]

creates an array of information out of a list of objects which can be used to form a table.

The idea of this is that you can pass an array of objects, an array of functions to perform on each object and a name for the index of the returning array to store the result.

Parameters:
$inputListthe list of objects of which we want to make a table.
$funcArraya list of methods of that object we want to perform.
$fieldArraya list of strings, that will be used to store our result into.
Returns:
an array with the indexes listed in $fieldArray and which holds the results of the methods in $funcArray on each object in the $inputList
static make_table_with_key_is_id ( inputList,
funcArray,
idFunction 
) [static]

creates an array of information out of a list of objects which can be used to form a table with a key as id.

The idea is comparable to the make_table() function, though this time the results are stored in the index that is returned by the idFunction()

Parameters:
$inputListthe list of objects of which we want to make a table.
$funcArraya list of methods of that object we want to perform.
$idFunctiona function that returns an id that will be used as index to store our result
Returns:
an array which holds the results of the methods in $funcArray on each object in the $inputList, though thearrays indexes are formed by using the idFunction.
static time_elapsed_string ( ptime) [static]

returns the elapsed time from a timestamp up till now.

Parameters:
$ptimea timestamp.
Returns:
a string in the form of A years, B months, C days, D hours, E minutes, F seconds ago.

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables