maillotf/pcvue-bridge-bundle

There is no license information available for the latest version (1.0) of this package.

A PcVue bundle for Symfony

1.0 2020-10-07 15:26 UTC

This package is auto-updated.

Last update: 2024-10-23 19:20:50 UTC


README

Software license Latest stable Packagist PHP Version Support

Symfony bundle for PcVue client which is base on OAuth2 authentication

Required configuration

Modify framework.yaml

pcvue:
    authentication:
        protocol: "http"
        host: "127.0.0.1"
        port: "80"
        client_id: "CLIENT_ID"
        client_secret: "CLIENT_SECRET"
        username: "USERNAME"
        password: "PASSWORD"
#        root_dir: "ROOT_DIR"

root_dir is optional

Modify services.yaml

services:
    MaillotF\Pcvue\PcvueBridgeBundle\Service\PcvueService: '@pcvue.service.main'

Package instalation with composer

$ composer require maillotf/pcvue-bridge-bundle

Use in controller:

<?php
//...
use MaillotF\Pcvue\PcvueBridgeBundle\Service\PcvueService;

class exampleController extends AbstractController
{
	/**
	 * Example
	 * 
	 * @Route("example", name="example", methods={"GET"})
	 * 
	 */
	public function test(PcvueService $ps)
	{
		$user = $ps->user->getUser('4665');
		
		return ($this->json($user->getEmail()));
	}

}

FAQ

You can get answer in the FAQ