newism / symfony2-standard-template

2 stars 5 forks source link

vCardBundle #8

Open leevigraham opened 10 years ago

leevigraham commented 10 years ago

Let's create a vCardBundle! Every project has people, addresses, tels, urls, immps etc.

Pros:

Cons:

ping @iainsaxon @ianbelcher

leevigraham commented 10 years ago

screen shot 2014-04-07 at 5 59 33 pm

Rethinking this slightly:

Should there be a ContactCard that encapsulates all this functionality? If that was the case it would almost be like this is a Trait. Person would have the trait of ContactCard, so could Organisation or anything else.

The only issue here is that the construction of a vcard (or similar) would rely on the owning Person / Organsiation to create half the data and the contact card to create the rest. Maybe Person / Organisation could implement some kind of vCard interface:


<?php

interface VCardEntityInterface
{
    public function getVCardEntityData();
    public function getVCardContactData();
}