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

Class: Contact_AddressBook

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

Class Overview


Main Contact_AddressBook class.


Author(s):

Version:

  • Release: 0.5.1

Copyright:

  • Copyright (c) 2004-2005 Firman Wandayandi

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 134]
Main Contact_AddressBook class.
  • Author: Firman Wandayandi <firman@php.net>
  • Version: Release: 0.5.1
  • Copyright: Copyright (c) 2004-2005 Firman Wandayandi
  • Todo: Add Vcard, LDIF and WAB (Binary) support.
  • Todo: Mac format complain.
  • Todo: Add storage backend (is it necessary needed?)
  • Todo: PHPUnit tests.
  • License: BSD License


[ Top ]


Class Variables

$_options = array(
        'def_dir'   => '',         // Definitions directory.
        'language'  => 'en'        // Language.
    )

[line 144]

Options.
  • Access: protected

Type:   array


[ Top ]



Method Detail

Contact_AddressBook (Constructor)   [line 191]

Contact_AddressBook Contact_AddressBook( [array $options = null])

Constructor.
  • Access: public

Parameters:

array   $options   —  (optional) The options.

[ Top ]

createBuilder   [line 395]

object Builder createBuilder( string $format)

Create builder object for the specified address book format.
  • Return: object on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $format   —  The address book format name.

[ Top ]

createConverter   [line 343]

object Converter createConverter( string $format)

Create converter object for the specified address book format.
  • Return: object on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $format   —  The address book format name.

[ Top ]

createParser   [line 303]

object Parser createParser( string $format)

Create parser object for the specified address book format.
  • Return: object on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $format   —  The address book format name.

[ Top ]

export   [line 491]

array|PEAR_Error export( array $data, string $format)

Export data from internal structure to external format structure.
  • Return: An array result on success or PEAR_Error on failure.
  • Access: public

Parameters:

array   $data   —  Data.
string   $format   —  Structure format.

[ Top ]

exportToFile   [line 519]

array|PEAR_Error exportToFile( string $filename, string $format, array $data, [bool $via_browser = true])

Export data from internal format to external data structure and save it to file.
  • Return: An array result on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $filename   —  Filename.
string   $format   —  File format.
array   $data   —  Address book contacts data.
bool   $via_browser   —  (optional) Tell the whether to output via browser (downloading) or not.

[ Top ]

exportToPrint   [line 553]

bool|PEAR_Error exportToPrint( string $format, array $data)

Export data from internal format to external data structure and print it.
  • Return: TRUE on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $format   —  File format.
array   $data   —  Address book contacts data.

[ Top ]

get   [line 247]

mixed get( [string $option = null])

Get single or all options.
  • Return: Value of option or an array of all options.
  • Access: public

Parameters:

string   $option   —  (optional) Option name.

[ Top ]

getDataDir   [line 269]

string getDataDir( )

Get PEAR data directory.
  • Return: PEAR data directory.
  • Access: public

[ Top ]

import   [line 440]

array|PEAR_Error import( array $data, string $format)

Import data from specified format structure to internal structure.
  • Return: An array result on success or PEAR_Error on failure.
  • Access: public

Parameters:

array   $data   —  Data.
string   $format   —  Structure format.

[ Top ]

importFromFile   [line 464]

array|PEAR_Error importFromFile( string $filename, string $format)

Import data from specified format structure saved in the file to internal structure.
  • Return: An array result on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $filename   —  Filename.
string   $format   —  File format.

[ Top ]

isSupported   [line 287]

bool isSupported( string $format)

Find the whether address book format is supported or not.
  • Return: TRUE if supported, otherwise FALSE.
  • Access: public

Parameters:

string   $format   —  Address book format.

[ Top ]

set   [line 216]

bool|PEAR_Error set( mixed $option, [mixed $value = null])

Set the option(s).

Set a single option or multiple options.

  • Return: TRUE on success, PEAR_Error on failure.
  • Access: public

Parameters:

mixed   $option   —  A string with option name as value for single option or An associative array contains options array('<option>' => <value>) for multiple options.
mixed   $value   —  (optional) Option value. Require when $option is string (single option mode).

[ Top ]


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