openclassrooms / front-desk-bundle
Front Desk Symfony2 Bundle
Installs: 3 580
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 29
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=5.6
- openclassrooms/front-desk: 1.1.6
- symfony/config: >=2.7 <4
- symfony/dependency-injection: >=2.7 <4
- symfony/http-kernel: >=2.7 <4
Requires (Dev)
- phpunit/phpunit: ~5.0
- satooshi/php-coveralls: 1.*
README
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);