Contact_AddressBook
[ class tree: Contact_AddressBook ] [ index: Contact_AddressBook ] [ all elements ]

Class: Contact_AddressBook_Converter

Source Location: /Contact_AddressBook-0.1.0dev1/Contact/AddressBook/Converter.php

Class Overview


Class for handling address book data structure converting.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 64]
Class for handling address book data structure converting.


[ Top ]


Class Variables

$definition = array()

[line 74]

Address Book default definition.
  • Access: protected

Type:   array


[ Top ]

$isPrepared =  false

[line 98]

Flag tell the whether the map is prepared or not.
  • Access: protected

Type:   bool


[ Top ]

$mapFrom = array()

[line 82]

Map for converting from external structure into default structure.
  • Access: protected

Type:   array


[ Top ]

$mapTo = array()

[line 90]

Map for converting from default structure into external structure.
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 122]

Contact_AddressBook_Converter __construct( [string $def_dir = null])

PHP5 Compatible contructor.
  • Access: public

Parameters:

string   $def_dir   —  Definition files directory.

[ Top ]

Contact_AddressBook_Converter (Constructor)   [line 110]

Contact_AddressBook_Converter Contact_AddressBook_Converter( [string $def_dir = null])

PHP4 Compatible contructor.
  • Access: public

Parameters:

string   $def_dir   —  Definition files directory.

[ Top ]

convertFrom   [line 308]

array|PEAR_Error convertFrom( array $data)

Convert from default data structure into external structure.

Parameters:

array   $data   —  Address book data.

[ Top ]

convertTo   [line 286]

array|PEAR_Error convertTo( array $data)

Convert from default data structure into external structure.

Parameters:

array   $data   —  Address book data.

[ Top ]

loadDefinitionFile   [line 171]

bool|PEAR_Error loadDefinitionFile( string $file)

Load the definition file.

The bundle default definition files was placed at PEAR data dir.

  • Return: TRUE on succeed or PEAR_Error on failure.
  • Access: public

Parameters:

string   $file   —  Definition filename.

[ Top ]

performConvert   [line 253]

array|PEAR_Error performConvert( array $map, array $data)

Perform data converting.
  • Return: An array of converted data on succeed or PEAR_Error on failure
  • Access: protected

Parameters:

array   $map   —  Converting map.
array   $data   —  Address book data to convert.

[ Top ]

setDefinition   [line 195]

bool|PEAR_Error setDefinition( array $definition)

Set custom definition on runtime.
  • Return: TRUE on succeed or PEAR_Error on failure.
  • Access: public

Parameters:

array   $definition   —  An array of definition structure.

[ Top ]

setDefinitionDir   [line 144]

void setDefinitionDir( $dir)


Parameters:

   $dir   — 

[ Top ]

__toString   [line 136]

string __toString( )

PHP5 __toString magic method.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:00:18 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.