Download the PHP package iionly/expirationdate without Composer

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

Expirationdate plugin for Elgg 5.0 and newer Elgg 5.X

Latest Version: 5.0.0
Released: 2024-11-01
Contact: [email protected]
License: GNU General Public License version 2
Copyright: (c) Brett Profitt (Original developer) / iionly (for Elgg 1.8 onwards)

Description

The Expirationdate plugin can be used to define a date of expiration for entities and to delete them automatically via a cron job. The plugin provides no user interface on your site (apart from setting the desired cron interval in the admin section).

For example this plugin can optionally be used with the Elggx Userpoints plugin.

If you only intend to use the Expirationdate plugin in connection with another plugin that already has the expiration date mechanism implemented, you only need to enable it like another Elgg plugin and set the desired cron interval in the plugin's settings. Additionally, at least the cronjob for this interval must be configured on your server!

If you intend to use the methods included in the Expirationdate plugin within your own plugin development, read on.

Installation

  1. If you have installed a previous version of the Expirationdate plugin plugin disable the plugin in the admin section of your site and then remove the expirationdate folder from the mod directory of your Elgg installation,
  2. Copy the expirationdate folder into the mod directory of your Elgg installation,
  3. Enable the Expirationdate plugin plugin in the admin section of your site and set the desired cron interval in the Expirationdate plugin settings.

Usage

Configure cron for Elgg as described in the Elgg documentation.

Install and enable the Expirationdate plugin. Be sure to set the plugin's period to something that will match nicely with your cron jobs.

Within your plugin, set entity expiration dates by saying:

\Expirationdate::expirationdate_set($entity->guid, $expiration_date_string, bool);

where $expiration_date_string is a valid strtotime() string. If the 3rd parameter is true, the entity will be disabled instead of deleted.

Unset expiration dates by saying:

\Expirationdate::expirationdate_unset($entity->guid);

Before entities are deleted the plugin_hook expirationdate:expirate_entity is called with $param set as:

array('entity' => entity object)

If you register a function to this hook, the entity will not be deleted/disabled unless the function returns true.

Each entity that has an expiration date will be passed through the plugin hook expirationdate:will_expire_entity with the $param set as:

array('expirationdate' => timestamp of expiration, 'entity' => entity object)

This can be used to send out warning emails, etc.


All versions of expirationdate with dependencies

PHP Build Version
Package Version
Requires composer/installers Version >=1.0.8
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 iionly/expirationdate contains the following files

Loading the files please wait ....