shoppimon/ockham
Composer 安装命令:
composer require shoppimon/ockham
包简介
Support / ticketing system API abstraction layer
README 文档
README
Ockham is a minimal abstraction layer, wrapping different APIs to 3rd party support ticketing systems. Its purpose is not to provide the full functionality one would expect from a ticketing system API, but rather a "lowest common denominator" implementation of what most apps need when integrating with a ticketing system - i.e. creating tickets, and possibly a few more actions, but not more than that.
Installation
Ockham is available via Composer. Add it to your project by running the following composer command on your project root:
$ composer require shoppimon/ockham
In addition, most service adapter implementations need to be required explicitly (they are only suggested by the composer package and not required because most people won't use all of them). So, you need to require the specific underlying library(ies) as well, for example:
$ composer require uservoice/uservoice
This will bring any required dependencies along as well.
Note that composer will set up the include path is required, so assuming you
don't already do so (usually your framework will), you need to require
composer's autoloader file from vendor/autoload.php
Implemented Adapters
uservoice- Create tickets on uservoice.com requires theuservoice/uservoicecomposer packagezendmail- "Create a ticket" by sending an email to a given address using the Zend\Mail ZF2 component. requires thezendframework/zend-mailcomposer packagemock- A mock implementation, doesn't really do anything and has no requirements; Should be used for testing purposes only.
Usage
Once installed, you can use the Factory method to get an instance of the required backend class:
use Ockham\Factory;
$options = array(
'transport' => array(
'type' => 'smtp',
'options' => array()
),
'to' => array('feedback@shoppimon.com', 'Shoppimon Support'),
'from' => array('do-not-reply@shoppimon.com'),
'subject_prefix' => '[Support Request]'
);
$ticketService = Factory::createService('zendmail', $options);
$ticketService->createTicket('noob@example.com', 'I need help!', $message);
Some additional options and functionality is documented in the code (for now, sorry).
Framework Wrappers
It is our goal to ship Ockham with no stict dependancies on any PHP Framework. That said, we aim to ship some optional "Framework Wrappers" that wrap the Factory class with some framework-specific service provider API.
Currently, Zend Framework 2 users can use the Ockham\Wrapper\Zf2 class as
a Service Manager Factory to easily provide Ockham as an app-wide service. See
the class PHPDoc comment for details.
Contributing, TODO
You can contribute by forking the project's canonical repo and sending out pull requeusts. The following is a non-comprehensive TODO list:
- Unit tests
- Documentation
- Create additional adapters (e.g. ZenDesk, more mail adapters)
Copyright
(c) 2015 Shoppimon LTD, all rights reserved.
Ockham is an open-source project released by the development team of Shoppimon, under the MIT license.
shoppimon/ockham 适用场景与选型建议
shoppimon/ockham 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.35k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 04 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「abstraction」 「api」 「support」 「ticketing」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 shoppimon/ockham 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shoppimon/ockham 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 shoppimon/ockham 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.
ADOdb is a PHP database abstraction layer library
Slimmed down concise interfaces and query builder for database queries and transactions which can be layered / decorated.
A PSR-7 compatible library for making CRUD API endpoints
a simple toolkit for social networks
ARCANEDEV Support Helpers
统计信息
- 总下载量: 1.35k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-29