noetix / traction-bundle
此包已被 废弃 且不再维护。未建议替代包。
Symfony2 的 Traction API 包
v1.1
2014-03-05 22:44 UTC
Requires
- php: >=5.3.3
- noetix/traction-php: ~1.1
This package is auto-updated.
Last update: 2024-02-09 00:19:33 UTC
README
这是一个为提供对 traction-php 库的便捷访问的 Symfony2 扩展包。
安装
Composer
使用 composer 获取扩展包
php composer.phar require noetix/traction-bundle:*
AppKernel
在您的 AppKernel 中启用扩展包
new noetix\TractionBundle\noetixTractionBundle(),
配置
在 config.yml
中配置扩展包
经典 API
noetix_traction:
endpoint_id: 12345
user_id: my_username
password: fantastic_password
动态 API
noetix_traction:
endpoint_id: notused
user_id: notused
password: fantastic_password
connection: 2n5e7b2r8qkx07dy2ctd
示例
获取 Traction 经典 API 的经典处理器
$traction = $this->get('traction.handler');
获取 Traciton 动态 API 的动态处理器
$traction = $this->get('traction.dynamic');
更多代码示例请参阅 traction-php