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

Class: Contact_AddressBook_Parser

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

Class Overview


Base class for Contact_AddressBook parser classes.


Author(s):

Version:

  • Release: 0.5.1

Copyright:

  • Copyright (c) 2004-2005 Firman Wandayandi

Variables

Methods


Child classes:

Contact_AddressBook_Parser_CSV
Class for parse CSV address book format.
Contact_AddressBook_Parser_Eudora
Class for handling Eudora address book format parse.

Inherited Variables

Inherited Methods


Class Details

[line 76]
Base class for Contact_AddressBook parser classes.
  • Author: Firman Wandayandi <firman@php.net>
  • Version: Release: 0.5.1
  • Copyright: Copyright (c) 2004-2005 Firman Wandayandi
  • License: BSD License


[ Top ]


Class Variables

$file =  ''

[line 94]

File to parse.
  • Access: protected

Type:   string


[ Top ]

$result = array()

[line 86]

Parse result.
  • Access: protected

Type:   array


[ Top ]



Method Detail

getFileContents   [line 185]

string|PEAR_Error getFileContents( )

Read the input file to gets file contents.
  • Return: String file contents on succeed or PEAR_Error on failure.
  • See: File::read()
  • Access: protected

[ Top ]

getResult   [line 140]

array getResult( )

Get parse result data.
  • Return: The result array.
  • Access: public

Overridden in child classes as:

Contact_AddressBook_Parser_CSV::getResult()
Get the parse result.

[ Top ]

numRows   [line 154]

int numRows( )

Returns the number of rows in a result.
  • Return: The number of rows.
  • Access: public

[ Top ]

parse   [line 126]

bool|PEAR_Error parse( )

Parse input file to gets address book data.
  • Return: TRUE on succeed or PEAR_Error on failure.
  • Access: public

Overridden in child classes as:

Contact_AddressBook_Parser_CSV::parse()
Parse input file to gets address book data.
Contact_AddressBook_Parser_Eudora::parse()
Parse input file to gets address book data.

[ Top ]

reset   [line 168]

void reset( )

Reset the parser.

This method set the result into empty array.

  • Access: public

[ Top ]

setFile   [line 107]

bool|PEAR_Error setFile( string $file)

Set the input file to parse.
  • Return: TRUE on succeed or PEAR_Error on failure.
  • Access: public

Parameters:

string   $file     Input filename.

[ Top ]


Documentation generated on Fri, 15 Oct 2010 14:30:05 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.