sputnik / newsletter-bundle
此包已被废弃,不再维护。未建议替代包。
关于此包最新版本(v0.1.0)没有可用的许可证信息。
为各种通讯/订阅列表提供订阅者功能。
v0.1.0
2013-08-21 13:17 UTC
Requires
- php: >=5.3.3
- henrikbjorn/stampie: ~0.7
- symfony/framework-bundle: ~2.3
This package is not auto-updated.
Last update: 2018-09-04 18:39:32 UTC
README
SputnikNewsletterBundle为各种通讯/订阅列表提供订阅功能。这个包受到Stampie库的启发,并作为当前包的基础。
主要功能
- 配置多个订阅者。
- 为多种订阅者类型提供基础(目前仅支持CampaignMonitor)。
- 控制台命令用于手动电子邮件订阅。
注意:有一个包含已安装和配置的Sputnik包的示例Sandbox应用 - https://github.com/sputnik-project/sandbox。
快速示例
服务使用
use Sputnik\Bundle\NewsletterBundle\Message\Subscription; class MyController extends Controller { public function subscribeAction($email) { try { $this->get('sputnik_newsletter.campaign_monitor')->subscribe(new Subscription($email)); } catch (\RuntimeException $e) { $e->getMessage(); // API message $e->getPrevious()->getMessage(); // HTTP error $e->getPrevious()->getStatusCode(); // HTTP error code // Return erroneous response here. } // Return successful response here. } }
文档
文档可以在Resources/doc
中找到。您可以从安装说明开始。