openclassrooms/front-desk-bundle

Front Desk Symfony2 Bundle

Installs: 3 580

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 26

Forks: 0

Open Issues: 1

Type:symfony-bundle

v1.1.4 2017-11-20 16:11 UTC

README

SensioLabsInsight Build Status Coverage Status

The FrontDeskBundle offers integration of the FrontDesk Library. FrontDesk Library is a PHP5 library that provides FrontDesk functionality in your application. See FrontDesk for full details.

Installation

This bundle can be installed using composer:

composer require openclassrooms/front-desk-bundle

or by adding the package to the composer.json file directly:

{
    "require": {
        "openclassrooms/front-desk-bundle": "*"
    }
}

After the package has been installed, add the bundle to the AppKernel.php file:

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new OpenClassrooms\Bundle\FrontDeskBundle\OpenClassroomsFrontDeskBundle(),
    // ...
);

Configuration

# app/config/config.yml

openclassrooms_frontdesk:
    key:  %frontdesk.key%
    token: %frontdesk.token%

Usage

ENROLLMENT

$enrollmentService = $container->get('openclassrooms.frontdesk.service.enrollment');

Query Enrollment

$enrollmentService->query($field, $filter, $limit);

PACK

$packService = $container->get('openclassrooms.frontdesk.service.pack');

Create Pack

$packService->create(new PackStub());

Delete Pack by id

$packService->deletePack($packId); 

PERSON

$personService = $container->get('openclassrooms.frontdesk.service.person');

Post Person

$personService->create(new PersonStub());

Put Person

$personService->update(new PersonStub());

Get Person by id

$personService->find($personId);

Get All People

$personService->findAll($page);

Get person by query

$personService->search($query);

PLAN

####Get Plan by Person id

$planService = $container->get('openclassrooms.frontdesk.service.plan');
$planService->getPlans($personId);

VISIT

Get Visits by person id

$visitService = $container->get('openclassrooms.frontdesk.service.visit');
$visitService->getVisits($personId, $from, $to);

Delete Visit by id

$visitService = $container->get('openclassrooms.frontdesk.service.visit');
$visitService->deleteVisit($visitId);