Download the PHP package mstilkerich/carddavclient without Composer

On this page you can find all versions of the php package mstilkerich/carddavclient. 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 carddavclient

CardDAV client library for PHP ("PHP-CardDavClient")

CI Build codecov Type Coverage Psalm level

This is a library for PHP applications to interact with addressbooks stored on CardDAV servers.

Index

Features

See the feature matrix for which services to my observations support which features; the file also contains a list of the known issues I am aware of with the different servers.

Tested Servers

Currently, this library has been tested to interoperate with:

In theory, it should work with any CardDAV server. If it does not, please open an issue.

Note: For using any authentication mechanism other than Basic, you need to have the php-curl extension installed with support for the corresponding authentication mechanism.

Installation instructions

This library is intended to be used with composer to install/update the library and its dependencies. It is intended to be used with a PSR-4 compliant autoloader (as provided by composer).

To add the library as a dependency to your project via composer:

  1. Download composer (skip if you already have composer): Instructions

  2. Add this library as a dependency to your project

  3. To use the library in your application with composer, simply load composer's autoloader in your main php file:

The autoloader will take care of loading this and other PSR-0/PSR-4 autoloader-compliant libraries.

Documentation

Quickstart

Generally, an application using this library will want to do some or all of the following things:

  1. Discover addressbooks from the information provided by a user: For this operation, the library provides a service class MStilkerich\CardDavClient\Services\Discovery. The service takes the account credentials and a partial URI (at the minimum a domain name) and with that attempts to discover the user's addressbooks. It returns an array of MStilkerich\CardDavClient\AddressbookCollection objects, each representing an addressbook.

  2. Recreate addressbooks in known locations, discovered earlier. This is possible by simply creating instances of MStilkerich\CardDavClient\AddressbookCollection.

  3. Initially and periodically synchronize the server-side addressbook with a local cache: For this operation, the library provides a service class MStilkerich\CardDavClient\Services\Sync. This service performs synchronization given MStilkerich\CardDavClient\AddressbookCollection object and optionally a synchronization token returned by the previous sync operation. A synchronization token is a server-side identification of the state of the addressbook at a certain time. When a synchronization token is given, the server will be asked to only report the delta between the state identified by the synchronization token and the current state. This may not work for various reasons, the most common being that synchronization tokens are not kept indefinitly by the server. In such cases, a full synchronization will be performed. At the end of the sync, the service returns the synchronization token reflecting the synchronized state of the addressbook, if provided by the server.

  4. Perform changes to the server-side addressbook such as creating new address objects. These operations are directly provided as methods of the MStilkerich\CardDavClient\AddressbookCollection class.

  5. Search the server-side addressbook to retrieve cards matching certain filter criteria. This operation is provided via the MStilkerich\CardDavClient\AddressbookCollection::query() API.

There is a demo script doc/quickstart.php distributed with the library that shows how to perform all the above operations.

Sample Applications

For a simple demo application that makes use of this library, see davshell. It shows how to use the library for the discovery and synchronization of addressbooks.

As a more complex real-world application, you can also take a look at the Roundcube CardDAV plugin, which also uses this library for the interaction with the CardDAV server.

API documentation

An overview of the API is available here.

The API documentation for the latest released version can be found here. The public API of the library can be found via the Public package in the navigation sidebar.

Documentation for the API can be generated from the source code using phpDocumentor by running make doc.


All versions of carddavclient with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
guzzlehttp/guzzle Version ^6.0.0 || ^7.0.0
psr/http-client Version ^1.0
psr/http-message Version ^1.0 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0
sabre/vobject Version ^3.3.5 || ^4.0.0
sabre/xml Version ^2.2 || ^3.0.0 || ^4.0.0
sabre/uri Version ^2.2
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 mstilkerich/carddavclient contains the following files

Loading the files please wait ....