承接 willdurand/propel-publishable-behavior 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

willdurand/propel-publishable-behavior

最新稳定版本:1.2.0

Composer 安装命令:

composer require willdurand/propel-publishable-behavior

包简介

README 文档

README

Build Status

The PublishableBehavior is designed to quickly add publish/unpublish features to your model.

Installation

Install the behavior in your project, the recommended way is to use Composer:

{
    "require": {
        "willdurand/propel-publishable-behavior": "dev-master"
    }
}

Add the following line to your propel.ini or build.properties configuration file:

propel.behavior.publishable.class = vendor.willdurand.propel-publishable-behavior.src.PublishableBehavior

Note: vendor.willdurand.propel-publishable-behavior.src is the path of the behavior in dot-path notation.

Usage

ActiveRecord API

Returns true if the object is published, false otherwise:

isPublished()

Mark an object as published:

publish(PropelPDO $con = null)

Mark an object as not published:

unpublish(PropelPDO $con = null)

Has publication frame started ?

hasPublicationEnded()

Has publication frame started ?

hasPublicationStarted()

ActiveQuery API

Include unpublished objects in the results set:

includeUnpublished()

Filter by objects not published exclusively:

filterUnpublished()

Filter by objects published exclusively:

filterPublished()

Filter by publication active

filterByPublicationActive($date = 'now')

Mark an object as published:

publish(PropelPDO $con = null)

Mark an object as not published:

unpublish(PropelPDO $con = null)

Parameters

<behavior name="publishable">
    <parameter name="is_published_column" value="is_published" />
    <parameter name="published_by_default" value="false" />
    <parameter name="include_unpublished" value="false" />
    <!-- timeframe support -->
    <parameter name="with_timeframe" value="false" />
    <parameter name="published_at_column" value="published_at" />
    <parameter name="published_until_column" value="published_until" />
    <!-- start and end value can be null -->
    <parameter name="require_start" value="false" />
    <parameter name="require_end" value="false" />
</behavior>

Note: Parameter include_unpublished allows you to exclude unpublished object from each query. It is setup to false by default. If you don't want to exclude unpublished items, you have to set it to true

Running tests

First of all, copy the phpunit.xml.dist to phpunit.xml.

If you did not install propel with composer, change PROPEL_DIR and PHING_DIR values to customize the include path. Customize autoloader by changing AUTOLOAD property.

then simply launch

$ vendor/bin/phpunit -c phpunit.xml

All green?

Credits

willdurand/propel-publishable-behavior 适用场景与选型建议

willdurand/propel-publishable-behavior 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.35k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2012 年 05 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「propel」 「Behavior」 「publishable」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 willdurand/propel-publishable-behavior 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 willdurand/propel-publishable-behavior 我们能提供哪些服务?
定制开发 / 二次开发

基于 willdurand/propel-publishable-behavior 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 20.35k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 17
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-05-10