Download the PHP package pleb/vcardio without Composer

On this page you can find all versions of the php package pleb/vcardio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vcardio

vCardIO - Parse, read, manipulate & write vCard (.vcf files)

Latest Version on Packagist Tests Total Downloads

This package based on RFC 6350 is intended to simplify the parsing and the manipulation of vCard objects, coming from .vcf files or from raw data. It allows you to build vCard objects & export them to text or .vcf files.

Installation

Via composer:

Documentation

Usage

Parsing data

You can parse vCards objects from .vcf file or from raw data, and obtain an iterable collection of vCards.

The vCards collection

The result of parsing is a collection of vCards:

Manually build a vCards collection

Manipulate collection

The VCardsCollection object implements ArrayAccess, Iterator and Countable interfaces, so you can loop on it.

The vCard object

A huge set of methods is implemented to read the vCard properties. You can see all available getters methods on the vCard object documentation.

Note on "Pseudo-singular" properties

RFC 6350 allows most of properties to be present multiple times in a vCard. For example the FN (fullName) property can be present 1 or multiple times, and accompagnied by attributes to distinct them.

In this package, we assume that some of properties (like fullName) got a unique main value. The vCard's getProperty() methods will return this main value, as well as the sub-object $vCard->relevantData.

The complete set of value is stil available in the root of $vCard object.

Note on the old school AGENT property

The AGENT property is not longer supported by the vCard specification, but if you parse old data, you can see something like this, with nested vCards:

This package will parse it as a VCard's agent property:

The vCard builder

You can create your vCard objects from scratch fluently by using the large set of methods implemented on the vCard builder. You can see all available setters methods on the vCard builder documentation.

Each method returns the builder instance, so you can chain them.

Use the get() method to get your vCard.

Print vCards

Print a single vCard

You can use (string) $vCard to display vCard contents:

Print vCards collection

The same is true for vCards collections, what will display the vCards serially:

Export vCards

Export a single vCard

The existing .vcf file will be overwritten.

Export vCards collection

The existing .vcf can be overwritten or appended.

Contribute

Code formatting

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of vcardio with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ramsey/uuid Version ^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pleb/vcardio contains the following files

Loading the files please wait ....