phpDocumentor SpoolTemplate
[ Back ] [ class tree: SpoolTemplate ] [ index: SpoolTemplate ] [ all elements ]

Class: DataStorage

Source Location: /sptpl_clsDataStorage.php

Class DataStorage

Class Overview

sptpl_clsDataStorage.php

Data item manager class. This file is part of the project SpoolTemplate. There is only one instance of this class!!

Located in /sptpl_clsDataStorage.php [line 40]



		
				Author(s):
		
		
		
Information Tags:
Version:  $Header: d:\cvs/classistd/sptpl/sptpl_clsDataStorage.php,v 2.3 2005/03/02 21:00:54 Darvin Exp $
Copyright:  sptpl_clsDataStorage.php is part of Sptpl project http://www.andrioli.com/en/sptpl.html and it is LGPL

Properties

Methods

[ Top ]
Property Summary
array   $ConstantTbl   Table of the constant name
object CCounter   $Counters   Array containing the counters defined. The index is the counter's name.
array   $DataFieldTbl   Table of the data field definition
mixed   $ValidDataFieldAttr  
array   $Values   Table of the variables/constant value

[ Top ]
Method Summary
DataStorage   DataStorage()   Class constructor
void   Add()   Add $value to data item $varName. If $value is not specified
  1. is assumed.
void   AddConstantXml()   Load the specified template file
void   AddCounter()  
void   AddFieldXml()   Add new field to field table
void   EvalText()   Evaluate the text (=run eval on the text passed)
boolean   ExistValue()   Check whether a data field exists.
string   GetEvalValue()   Return tha value for tha data field $VarName. Function used during eval'ing the row Use GetVar to retrieve the value of the specified data item
string   GetVar()   Return tha value for tha data field $VarName
void   RemoveCounter()  
void   RemoveFromValue()   Remove from $Values all data fields added from the current data row.
void   ResetCounter()   Set the counters to zero
boolean   SetVar()   Set/add a value for data field
void   ToValue()   Put into the array $Value each data from the fiels array.
void   UpdateCounters()   Update counter. Each counter will be added to its field

[ Top ]
Properties
array   $ConstantTbl [line 46]

Table of the constant name


[ Top ]
object CCounter   $Counters [line 69]

Array containing the counters defined. The index is the counter's name.


[ Top ]
array   $DataFieldTbl [line 51]

Table of the data field definition


[ Top ]
mixed   $ValidDataFieldAttr = array("sourcefield" => 1,
"stringformat" => 1,
"dateformat" => 1,
"value" => 1)
[line 60]

[ Top ]
array   $Values [line 58]

Table of the variables/constant value

The variable name is the first index. The variable may be an array


[ Top ]
Methods
Constructor DataStorage  [line 73]

  DataStorage DataStorage( )

Class constructor



[ Top ]
Add  [line 353]

  void Add( string $varName, [mixed $value = 1]  )

Add $value to data item $varName. If $value is not specified

  1. is assumed.

Parameters:
string   $varName:  Data item name
mixed   $value: 

API Tags:
Access:  public


[ Top ]
AddConstantXml  [line 85]

  void AddConstantXml( object CXml2Array $Cfg  )

Load the specified template file

Parameters:
object CXml2Array   $Cfg:  DomNode with the constant definition

API Tags:
Access:  public


[ Top ]
AddCounter  [line 178]

  void AddCounter( object CXml2array $Cfg  )

Parameters:
object CXml2array   $Cfg: 

API Tags:
Access:  public


[ Top ]
AddFieldXml  [line 113]

  void AddFieldXml( object XCml2Array $Cfg  )

Add new field to field table

Parameters:
object XCml2Array   $Cfg:  Object with the fields definition

API Tags:
Access:  public


[ Top ]
EvalText  [line 370]

  void EvalText( string $text  )

Evaluate the text (=run eval on the text passed)

Parameters:
string   $text: 


[ Top ]
ExistValue  [line 249]

  boolean ExistValue( string $VarName, [integer $ValueType = CURRENTVALUE]  )

Check whether a data field exists.

It doesn't support tha array

Parameters:
string   $VarName:  Data field name. VarName must be scalar
integer   $ValueType:  Use the value from the current row or from the previous row

API Tags:
Access:  public


[ Top ]
GetEvalValue  [line 210]

  string GetEvalValue( string $VarName, string $Value  )

Return tha value for tha data field $VarName. Function used during eval'ing the row Use GetVar to retrieve the value of the specified data item

This function apply the format parameter to the value

Parameters:
string   $VarName:  data field name
string   $Value:  value for data field

API Tags:
Access:  public


[ Top ]
GetVar  [line 282]

  string GetVar( string $VarName, [integer $ValueType = CURRENTVALUE]  )

Return tha value for tha data field $VarName

Parameters:
string   $VarName:  data field name. VarName must be scalar
integer   $ValueType:  where get the value, from the current or the previous?

API Tags:
Access:  public


[ Top ]
RemoveCounter  [line 191]

  void RemoveCounter( string $name  )

Parameters:
string   $name: 

API Tags:
Access:  public


[ Top ]
RemoveFromValue  [line 330]

  void RemoveFromValue( array $fields  )

Remove from $Values all data fields added from the current data row.

Parameters:
array   $fields:  Data field for the current row.

API Tags:
Access:  public


[ Top ]
ResetCounter  [line 383]

  void ResetCounter( array $CounterName  )

Set the counters to zero

Parameters:
array   $CounterName:  CounterName array holding the name of the counter to set to zero

API Tags:
Access:  public


[ Top ]
SetVar  [line 266]

  boolean SetVar( string $varName, string $value  )

Set/add a value for data field

Parameters:
string   $varName:  data field name. VarName must be scalar
string   $value:  value for data field. It may be an array

API Tags:
Access:  public


[ Top ]
ToValue  [line 308]

  void ToValue( array $fields  )

Put into the array $Value each data from the fiels array.

The parameter $fields is an associative array where the index is the data field name and the value is the data field value

Parameters:
array   $fields:  Data field for the current row.

API Tags:
Access:  public


[ Top ]
UpdateCounters  [line 396]

  void UpdateCounters( array $CounterName  )

Update counter. Each counter will be added to its field

Parameters:
array   $CounterName:  CounterName array holding the name of the counter to update

API Tags:
Access:  public


[ Top ]

Documentation generated on Mon, 28 Mar 2005 15:13:14 +0200 by phpDocumentor 1.3.0RC3