Download the PHP package protonlabs/libsieve-php without Composer
On this page you can find all versions of the php package protonlabs/libsieve-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download protonlabs/libsieve-php
More information about protonlabs/libsieve-php
Files in protonlabs/libsieve-php
Package libsieve-php
Short Description libsieve-php is a library to manage and modify sieve (RFC5228) scripts.
License GPL-3.0-or-later
Homepage https://sourceforge.net/projects/libsieve-php/
Informations about the package libsieve-php
libsieve-php
libsieve-php is a library to manage and modify sieve (RFC5228) scripts. It contains a parser for the sieve language (including extensions) and a client for the managesieve protocol.
This project is adopted from the discontinued PHP sieve library available at https://sourceforge.net/projects/libsieve-php.
Changes from the RFC
- The
date
and thecurrentdate
both allow forzone
parameter any string to be passed. This allows the user to enter zone names likeEurope/Zurich
instead of+0100
. The reason we allow this is because offsets like+0100
don't encode information about the daylight saving time, which is often needed.
Usage examples
The libsieve parses a sieve script into a tree. This tree can then be used to interpret its meaning.
Two example will be provided: one basic and one more complex.
Basic Example: Check if an extension is loaded
In this first example, we will check if a specific extension was loaded through a require node:
Complex Example: Dumping the tree
This second example will print back the sieve script from a parsed tree (note this could simply be done through
the method $tree->dump()
).
All versions of libsieve-php with dependencies
ext-mbstring Version *
ext-simplexml Version *