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

Class: Contact_AddressBook_Builder

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

Class Overview


Base class for build external formatted structure that may save to a file.


Author(s):

Variables

Methods


Child classes:

Contact_AddressBook_Builder_csv
Abstract class for building CSV address book format.
Contact_AddressBook_Builder_eudora
Class for building Eudora address book format.

Inherited Variables

Inherited Methods


Class Details

[line 74]
Base class for build external formatted structure that may save to a file.


[ Top ]


Class Variables

$data = array()

[line 94]

Cache for data.
  • Access: protected

Type:   array


[ Top ]

$options = array(
        'line_break' => "\n"
    )

[line 84]

Options.
  • Access: protected

Type:   array


[ Top ]

$result =  ''

[line 102]

Cache for result.
  • Access: protected

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 128]

Contact_AddressBook_Builder __construct( [array $data = null], [array $options = null])

PHP 5 compatible constructor.
  • Access: public

Parameters:

array   $data   —  (optional) Data.
array   $options   —  (optional) Options.

[ Top ]

Contact_AddressBook_Builder (Constructor)   [line 115]

Contact_AddressBook_Builder Contact_AddressBook_Builder( [array $data = null], [array $options = null])

PHP 4 compatible constructor.
  • Access: public

Parameters:

array   $data   —  (optional) Data.
array   $options   —  (optional) Options.

[ Top ]

build   [line 222]

bool|PEAR_Error build( )

Build the structure format.
  • Return: TRUE on success or PEAR_Error on failure.
  • Access: public

Overridden in child classes as:

Contact_AddressBook_Builder_csv::build()
Build the address book.
Contact_AddressBook_Builder_csv_outlook_express::build()
Build the structure format.
Contact_AddressBook_Builder_eudora::build()
Build the structure format.

[ Top ]

download   [line 266]

void download( [string $filename = null])

Download the result via browser.
  • Access: public

Parameters:

string   $filename   —  (optional) Filename.

[ Top ]

save   [line 251]

bool|PEAR_Error save( string $filename)

Save the result into file.
  • Return: TRUE on success or PEAR_Error on failure.
  • Access: public

Parameters:

string   $filename   —  Filename.

[ Top ]

set   [line 171]

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 ]

setData   [line 203]

bool|PEAR_Error setData( array $data)

Set data to build.
  • Return: TRUE on success or PEAR_Error on failure.
  • Access: public

Parameters:

array   $data   —  Data.

[ Top ]

show   [line 235]

void show( )

Print out the result.
  • Access: public

[ Top ]

__toString   [line 148]

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.