Xataface  2.0alpha2
Xataface Application Framework
 All Data Structures Namespaces Files Functions Variables Groups Pages
Public Member Functions | Static Public Member Functions | Data Fields
Dataface_Serializer Class Reference

Public Member Functions

 Dataface_Serializer ($tablename)
 serialize ($fieldname, $value, $handleRepeat=true)
 unserialize ($fieldname, $value)
 encrypt ($fieldname, $value=null)

Static Public Member Functions

static number2db ($value)

Data Fields

 $_table

Detailed Description

Definition at line 23 of file Serializer.php.

Member Function Documentation

Dataface_Serializer (   $tablename)

Definition at line 28 of file Serializer.php.

encrypt (   $fieldname,
  $value = null 
)

Wraps the value inside a mysql function to encrypt the input (if the 'crypt') attribute is selected.

Definition at line 208 of file Serializer.php.

static number2db (   $value)
static

Definition at line 32 of file Serializer.php.

serialize (   $fieldname,
  $value,
  $handleRepeat = true 
)

Serializes a value that comes from the field '$fieldname'. The output from this is meant to be inserted into a database. Note that this output is not escaped. You will still have to do that.

Parameters
$fieldnameThe name of the field from which this value supposedly comes.
$valueThe value to be serialized.
handleRepeatIf true (default) this will recursively serialize the individual fields of a repeat field.

Definition at line 57 of file Serializer.php.

unserialize (   $fieldname,
  $value 
)

This functions is not implemented yet, but its functionality is implicit any record's setValue() method. The delegate's *__parse() methods are supposed to handle deserialization.

Definition at line 198 of file Serializer.php.

Field Documentation

$_table

Definition at line 26 of file Serializer.php.


The documentation for this class was generated from the following file: