maillotf / papercut-bridge-bundle
A Papercut bundle for Symfony
Installs: 22
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- phpxmlrpc/phpxmlrpc: ^4.3
- 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-11-08 20:58:00 UTC
README
Symfony bundle for Papercut XML-RPC client which is base on token authentication
Required configuration
Modify framework.yaml
papercut: authentication: protocol: "http" host: "127.0.0.1" port: "80" path: "/rpc/api/xmlrpc" token: "TOKEN"
papercut: authentication: path: "http://URL/rpc/api/xmlrpc" token: "TOKEN"
Modify services.yaml
services: MaillotF\Papercut\PapercutBridgeBundle\Service\PapercutService: '@papercut.service'
##Package instalation with composer
$ composer require maillotf/papercut-bridge-bundle
Use in controller:
<?php //... use MaillotF\Papercut\PapercutBridgeBundle\Service\PapercutService; class exampleController extends AbstractController { /** * Example * * @Route("example", name="example", methods={"GET"}) * */ public function test(PapercutService $ps) { $user = $ps->user->getUser('4665'); return ($this->json($user->getEmail())); } }