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

Class: File_IMC

Source Location: /File_IMC-0.5.0/File/IMC.php

Class Overview


This class handles vCard and vCalendar files, formats designed by the Internet Mail Consortium (IMC).


Author(s):

Version:

  • Release: 0.5.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 89]
This class handles vCard and vCalendar files, formats designed by the Internet Mail Consortium (IMC).

vCard automates the exchange of personal information typically found on a traditional business card. vCard is used in applications such as Internet mail, voice mail, Web browsers, telephony applications, call centers, video conferencing, PIMs (Personal Information Managers), PDAs (Personal Data Assistants), pagers, fax, office equipment, and smart cards.

vCalendar defines a transport and platform-independent format for exchanging calendaring and scheduling information in an easy, automated, and consistent manner. It captures information about event and "to-do" items that are normally used by applications such as a personal information managers (PIMs) and group schedulers. Programs that use vCalendar can exchange important data about events so that you can schedule meetings with anyone who has a vCalendar-aware program.

This class is capable of building and parsing vCard 2.1, vCard 3.0, and vCalendar files. The vCard code was moved from Contact_Vcard_Build and Contact_Vcard_Parse, and the API remains basically the same. The only difference is that this package uses a factory pattern:

  1.      $parse =File_IMC::parse('vCard');
  2.      $build =File_IMC::build('vCard''3.0');
instead of
  1.      $parse = new Contact_Vcard_Parse();
  2.      $build = new Contact_Vcard_Build('3.0');



[ Top ]


Method Detail

autoload   [line 138]

boolean autoload( string $className)

SPL-compatible autoloader.
  • Access: public

Parameters:

string   $className   —  Name of the class to load.

[ Top ]

build   [line 159]

mixed build( string $format, [mixed $version = null])

Builder factory

Creates an instance of the correct parser class, based on the parameter passed. For example, File_IMC::parse('vCard') creates a new object to parse a vCard file.

  • Throws: File_IMC_Exception In case the driver is not found/available.
  • Access: public

Parameters:

string   $format   —  Type of file to parse, vCard or vCalendar
mixed   $version   —  Optionally, the version.

[ Top ]

parse   [line 202]

mixed parse( string $format)

Parser factory

Creates an instance of the correct parser class, based on the parameter passed. For example, File_IMC::parse('vCard') creates a new object to parse a vCard file.

  • Throws: File_IMC_Exception If no parse is found/available.
  • Access: public

Parameters:

string   $format   —  Type of file to parse, vCard or vCalendar

[ Top ]


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