Skip to content

Symfony bundle for Papercut XML-RPC client which is base on token authentication

License

Notifications You must be signed in to change notification settings

maillotf/papercut-bridge-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Papercut-bridge-bundle

Software license Latest stable Packagist PHP Version Support

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()));
	}

}

About

Symfony bundle for Papercut XML-RPC client which is base on token authentication

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages