-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
658a6f4
commit 9ec7309
Showing
4 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
// Don't forget to include the composer autoloader | ||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
use \rutgerkirkels\vcard_generator\Generator; | ||
use \rutgerkirkels\vcard_generator\Models\Name; | ||
use \rutgerkirkels\vcard_generator\Models\Organization; | ||
use \rutgerkirkels\vcard_generator\Models\Email; | ||
use \rutgerkirkels\vcard_generator\Models\Telephone; | ||
use \rutgerkirkels\vcard_generator\Models\Url; | ||
use \rutgerkirkels\vcard_generator\Models\Birthday; | ||
use \rutgerkirkels\vcard_generator\Models\Note; | ||
use \rutgerkirkels\vcard_generator\Models\Photo; | ||
|
||
$generator = new Generator(); | ||
$generator | ||
// Set the first and last name | ||
->setName(new Name('Marco', 'Woodberry')) | ||
// Set the name of the organization and the department (optional) | ||
->setOrganization(new Organization('ACME', 'Engineering')) | ||
// Add a business landline (optional) | ||
->addTelephone(new Telephone('+31206255455', 'WORK')) | ||
// Add a cellphone (optional) | ||
->addTelephone(new Telephone('+31693382817', 'CELL')) | ||
// Add a business e-mail address (optional) | ||
->addEmailAddress(new Email('[email protected]','work')) | ||
// Add a personal e-mail address (optional) | ||
->addEmailAddress(new Email('[email protected]','home')) | ||
// Set the person's birth date (optional) | ||
->setBirthday(new Birthday(new DateTime('1963-03-11'))) | ||
// Add a note (optional) | ||
->setNote(new Note('First line of the note' . PHP_EOL . 'Second line of the note')) | ||
// Add a business website (optional) | ||
->addUrl(new Url('https://www.acme.com','work')) | ||
// Store the VCF file. (default location is the current directory) | ||
->store(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters