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

Class: Contact_AddressBook_Converter

Source Location: /Contact_AddressBook-0.5.1/Contact/AddressBook/Converter.php

Class Overview


Class for handling address book data structure converting.


Author(s):

Version:

  • Release: 0.5.1

Copyright:

  • Copyright (c) 2004-2005 Firman Wandayandi

Variables

Methods


Child classes:

Contact_AddressBook_Converter_CSV
Class for handling CSV address book data structure converting.

Inherited Variables

Inherited Methods


Class Details

[line 82]
Class for handling address book data structure converting.
  • Author: Firman Wandayandi <firman@php.net>
  • Version: Release: 0.5.1
  • Copyright: Copyright (c) 2004-2005 Firman Wandayandi
  • License: BSD License


[ Top ]


Class Variables

$definition = array()

[line 100]

Address Book fields definition.
  • Access: protected

Type:   array


[ Top ]

$definitionDir =  ''

[line 92]

Directory contains definition files.
  • Access: protected

Type:   string


[ Top ]

$isPrepared =  false

[line 124]

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

Type:   bool


[ Top ]

$mapFrom = array()

[line 108]

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

Type:   array


[ Top ]

$mapTo = array()

[line 116]

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

Type:   array


[ Top ]



Method Detail

Contact_AddressBook_Converter (Constructor)   [line 129]

Contact_AddressBook_Converter Contact_AddressBook_Converter( )


[ Top ]

convertFrom   [line 332]

array|PEAR_Error convertFrom( array $data)

Convert from default data structure into external structure.

Overridden in child classes as:

Contact_AddressBook_Converter_CSV::convertFrom()
Convert from default data structure into external structure.

Parameters:

array   $data   —  Address book data.

[ Top ]

convertTo   [line 307]

array|PEAR_Error convertTo( array $data)

Convert from default data structure into external structure.

Parameters:

array   $data   —  Address book data.

[ Top ]

performConvert   [line 274]

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 180]

bool|PEAR_Error setDefinition( array $definition)

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

Parameters:

array   $definition   —  An array of definition structure.

[ Top ]

setDefinitionDir   [line 137]

void setDefinitionDir( $dir)


Parameters:

   $dir   — 

[ Top ]

setDefinitionFile   [line 212]

bool|PEAR_Error setDefinitionFile( string $file)

Load the definition file.

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


Parameters:

string   $file   —  Definition filename.

[ Top ]

setFormat   [line 155]

bool|PEAR_Error setFormat( string $format)

Set the address book format to convert.

Overridden in child classes as:

Contact_AddressBook_Converter_CSV::setFormat()
Set the address book format to convert.

Parameters:

string   $format   —  The address book format.

[ Top ]


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