shapecode/subscription-bundle

此包已被废弃,不再维护。未建议替代包。

Symfony 扩展包,用于管理用户订阅

0.2.0 2018-03-27 22:49 UTC

This package is not auto-updated.

Last update: 2020-09-11 10:14:35 UTC


README

paypal

PHP Version Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads Daily Downloads License

SubscriptionBundle 帮助您在应用程序中创建和管理用户订阅服务(也称为计划)。

SubscriptionBundle 与您的 Symfony 应用程序和模型完美匹配。它不关心您使用的是哪种持久化层(例如 http://www.doctrine-orm.orghttp://www.redis.io...);它只提供一个简单、可靠的起点,以便在 Symfony 应用程序中处理此类产品。

功能

  • 致力于维护一个简单、可靠、文档齐全且 无偏见 的基础,以便轻松开始工作,无需头痛。
  • 允许对订阅执行许多操作:激活过期禁用续订,并具有相应的事件。
  • 可扩展:您可以通过创建自己的策略来扩展和更改开箱即用的功能,这些策略确定如何处理订阅以符合您的需求。

兼容性

  • Symfony 3.3+/4+ 应用程序与 Doctrine

文档

快速入门

1. 下载包

$ composer require shapecode/subscription-bundle

2. 在 Symfony 应用程序中启用包(仅限 Symfony 3)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Shapecode\SubscriptionBundle\ShapecodeSubscriptionBundle(),
        );
    }

    // ...
}

3. 配置包

shapecode_subscription:
    # Where is the subscription model located in your application
    # Remember that your model must implement the interface
    subscription_class: AppBundle\Entity\Subscription # Interface: Shapecode\SubscriptionBundle\Model\SubscriptionInterface

    # Repository services name
    # Remember that repositories must be implement the interfaces
    subscription_repository: app.repository.subscription # Interface: Shapecode\SubscriptionBundle\Repository\SubscriptionRepositoryInterface
    product_repository: app.repository.product           # Interface: Shapecode\SubscriptionBundle\Repository\ProductRepositoryInterface

阅读完整的配置参考以获取更多配置选项或调整。

许可

此软件根据MIT 许可证发布。

贡献

如果您想贡献修复一些问题、提供新的策略或其他您想做的事情,我会非常高兴。谢谢!

信息

项目从 terox/SubscriptionBundle 分支而来。