Class data_map

Description

This class implements the mapping mechanism to keep track of the data records we already know about. Its most useful when inherited from the actual organization class

Located in /plugins/Figures/data_map.class.php (line 40)


	
			
Direct descendents
Class Description
 class data_table This class builds fundamental figures into a form that is easy to process in templates.
Variable Summary
 int $_date
 int $_id
 array $_map
 string $_name
 string $_period
 int $_year
Method Summary
 void __construct ()
 int get_date ()
 int get_id ()
 string get_name ()
 string get_period ()
 array get_uniq_ids ()
 int get_year ()
 int map_add (object $dao_figure_data)
Variables
int $_date (line 87)

date of the record currently processed by map_add()

  • access: protected
int $_id (line 73)

figure_var.id of the record currently processed by map_add()

This is actually the numerical id for $_name. It is better suitable as index since it avoids possible encoding issues

array $_map = array() (line 47)

the actual map that knows about year, id/name, period and age

  • access: protected
string $_name (line 62)

name of the record currently processed by map_add()

string $_period (line 80)

period of the record currently processed by map_add()

  • access: protected
int $_year (line 54)

year of the record currently processed by map_add(), 4 digits (YYYY)

  • access: protected
Methods
Constructor __construct (line 94)
  • access: public
void __construct ()

Redefined in descendants as:
get_date (line 207)

return date of the last item processed by map_add()

int get_date ()
get_id (line 160)

return figure_data id of the last item processed by map_add()

int get_id ()
get_name (line 150)

return name of the last item processed by map_add()

string get_name ()
get_period (line 197)

return period of the last item processed by map_add()

string get_period ()
get_uniq_ids (line 171)

return list of all uniq figure_var.id's known by the map or false in case there is none.

  • todo: could be done by caching things during map_add()
  • todo: implemented by looping the map
  • access: public
array get_uniq_ids ()
get_year (line 140)

return year of the last item processed by map_add()

int get_year ()
map_add (line 110)

add a variable to the map, return code indicates whether this data is already known (1), known and more recent (2) or not known at all (false).

NOTE:

  • in case a value has the same age as the previously added one, the later value is assumed to be more recent

  • access: public
int map_add (object $dao_figure_data)
  • object $dao_figure_data

Documentation generated on Sun, 22 Aug 2010 11:20:16 +0200 by phpDocumentor 1.4.3