havvg/propel-autoexpire-behavior 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

havvg/propel-autoexpire-behavior

最新稳定版本:0.1.0

Composer 安装命令:

composer require havvg/propel-autoexpire-behavior

包简介

The AutoExpireBehavior adds automatic expiration to your model.

README 文档

README

Build Status

See the Propel documentation on how to install a third party behavior

Usage

Just add the following XML tag in your schema.xml file:

<behavior name="auto_expire" />

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

Configuration

The following options are provided to customize the behavior.

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.

The required flag indicates whether the expiration date is required. If true the column will be NOT NULL.

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.

Expiration

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

  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.

统计信息

  • 总下载量: 148
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-12-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固