PHP Classes
elePHPant
Icontem

IMC Objects: Read and write iCalendar and vCard files

Recommend this page to a friend!
  Info   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2004-01-01 (12 years ago) RSS 2.0 feedStarStarStar 58%Total: 3,016 This week: 1All time: 1,165 This week: 1,047Up
Version License Categories
imcobjects 1.0GNU General Publi...Email, Time and Date, Libraries
Description Author

This is a package of classes that are meant to provide an interface to access data of iCalendar and vCard files defined by the IMC (Internet Mail Consortium).

The library can read and write files with the formats defined by IMC.

Picture of Andreas Haberstroh
Name: Andreas Haberstroh <contact>
Classes: 1 package by
Country: United States United States

Details
PHP 4.x Based vCard Reader/Writer Class
by Andreas Haberstroh

Ever since I discovered the Internet Mail Consortium website (imc.org) and learned 
about vCard and iCalendar files, I've been waiting for a PHP library that could both 
read and write these file formats, along with allowing access to the components and 
properties in a functional manner. Unfortunately, many attempts that have popped up 
on the Internet fall short of usefulness for me. Most classes that I've seen require 
direct access to internal class variables. This requires intense knowledge of the 
format for vCard and iCalendar. I'm a firm believer in encapsulation. So, I cracked 
open the latest RFC's on vCard and iCalendar formats and decided, it's time to 
roll my own.

My class library borrowed from a few of the libraries I found. Mostly, I borrowed 
the parameter parsing code. I used stuff from File_IMC on PEAR, written by 
Marshall Roch <mroch@php.net> and Paul Jones <pmjones@ciaweb.net>. I've also borrowed 
code from the vCard PHP project  <http://vcardphp.sourceforge.net>, written by 
Frank Hellwig <frank@hellwig.org>.

These classes are broken into the following hierarchical tree:

imcComponent
    imc_vCard

imcProperty
    imcPropertyAdr
    imcPropertyN

imcProperties live inside a imcComponent. The base imcComponent class can also parse 
iCalendar files. I'm currently working on a library to deal with iCalendar files. 

I've included a simple example application called test_vcard.php. This shows using 
the vCard object as a stand alone object, and also parses a simple vcf file and 
displays the results.


For a full blown usage sample, I'd suggest visiting http://www.ibusy.com/addressbook/
This sample allows for reading and writing to an addressbook. Storing more than 50 names
in the address book can cause problems, in that the webserver needs to read and parse the
contents of the entire file, even when paging. A better solution would be to store the
data in a database.
  Files folder image Files  
File Role Description
Plain text file class.imcComponent.php Class IMC Component Representation
Plain text file class.imcProperty.php Class IMC Property representation
Plain text file class.imcPropertyADR.php Class ADR Property subclass
Plain text file class.imcPropertyN.php Class N Property Subclass
Plain text file class.imcVCard.php Class VCard Component Subclass
Accessible without login Plain text file readme Doc. Readme file
Accessible without login Plain text file sample.vcf Data Sample VCF file for the test
Accessible without login Plain text file test_vcard.php Example Test application

 Version Control Unique User Downloads Download Rankings  
 0%
Total:3,016
This week:1
All time:1,165
This week:1,047Up
User Ratings User Comments (1)
 All time
Utility:71%StarStarStarStar
Consistency:71%StarStarStarStar
Documentation:78%StarStarStarStar
Examples:82%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1284
 
This package really does not work properly.
4 years ago (CPK Smithies)
22%StarStar