2017 © Pedro Peláez
 

library propel-autoexpire-behavior

The AutoExpireBehavior adds automatic expiration to your model.

image

havvg/propel-autoexpire-behavior

The AutoExpireBehavior adds automatic expiration to your model.

  • Tuesday, January 8, 2013
  • by havvg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 90 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AutoExpireBehavior

Build Status, (*1)

See the Propel documentation on how to install a third party behavior, (*2)

Usage

Just add the following XML tag in your schema.xml file:, (*3)

<behavior name="auto_expire" />

The behavior will add a column storing the expiration date and those methods: preExpire, expire, doExpire, postExpire and isExpired., (*4)

Configuration

The following options are provided to customize the behavior., (*5)

The column option defines the name of the column to store the expiration date into. If the column is not given, it will be added. Defaults to expires_at., (*6)

The required flag indicates whether the expiration date is required. If true the column will be NOT NULL., (*7)

An auto_delete option can be set to automatically delete the expired model. When set, this option will apply the "Expiration" behavior to the postHydrate hook of the model., (*8)

Expiration

Whenever a model expires by calling expire, the following behavior is applied - similar to save or delete., (*9)

  1. The preExpire method is called. The process will be aborted, if this methods returns false.
  2. The doExpire method will be called.
  3. The postExpire method is called afterwards.

In addition, the isExpired method will be added to check whether the model is expired., (*10)

The Versions

08/01 2013

dev-master

9999999-dev

The AutoExpireBehavior adds automatic expiration to your model.

  Sources   Download

MIT

The Requires

 

by Toni Uebernickel

behavior expiration propel auto-expire

08/01 2013

0.1.0

0.1.0.0

The AutoExpireBehavior adds automatic expiration to your model.

  Sources   Download

MIT

The Requires

 

by Toni Uebernickel

behavior expiration propel auto-expire