maillotf / ikentoo-bridge-bundle
针对 Symfony 的 ikentoo 套件
1.0.0
2020-10-12 14:14 UTC
Requires
- php: ^7.1
- symfony/config: ^3.2|^4.0|^4.1|^5.1
- symfony/dependency-injection: ^3.2|^4.0|^4.1|^5.1
- symfony/http-kernel: ^3.2|^4.0|^4.1|^5.1
Requires (Dev)
- phpunit/phpunit: ^6.5
This package is auto-updated.
Last update: 2024-09-13 00:22:27 UTC
README
基于令牌认证的 Ikentoo 的 Symfony 套件
所需配置
修改 framework.yaml
ikentoo: authentication: protocol: "http" host: "127.0.0.1" port: "80" token: "TOKEN"
修改 services.yaml
services: MaillotF\Ikentoo\IkentooBridgeBundle\Service\IkentooService: '@ikentoo.service'
##使用 Composer 安装包
$ composer require maillotf/ikentoo-bridge-bundle
在控制器中使用
<?php //... use MaillotF\Ikentoo\IkentooBridgeBundle\Service\IkentooService; class exampleController extends AbstractController { /** * Example * * @Route("example", name="example", methods={"GET"}) * */ public function test(IkentooService $is) { $from = new \DateTime('2020-01-09'); $to = new \DateTime('2020-10-09'); $result = $is->financial->getReceiptTransactionsRange("101163659689986", $from, $to, array('staff'), 1000); $menu = $is->orderAndPayment->loadMenu("101163222689111", 101112359691234, true) return ($this->json($menu)); } }