Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maillotf/ardaccess-bridge-bundle
Symfony bundle for ARD Access REST client which is base on username,password authentication
https://github.com/maillotf/ardaccess-bridge-bundle
access ard php symfony
Last synced: 24 days ago
JSON representation
Symfony bundle for ARD Access REST client which is base on username,password authentication
- Host: GitHub
- URL: https://github.com/maillotf/ardaccess-bridge-bundle
- Owner: maillotf
- License: lgpl-3.0
- Created: 2020-09-25T08:55:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-14T13:19:08.000Z (almost 4 years ago)
- Last Synced: 2024-10-11T19:51:48.940Z (about 1 month ago)
- Topics: access, ard, php, symfony
- Language: PHP
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ardaccess-bridge-bundle
[![Software license][ico-license]](LICENSE)
[![Latest stable][ico-version-stable]][link-packagist]
![Packagist PHP Version Support][ico-php-version]Symfony bundle for ARD Access REST client which is base on username,password authentication
## Documentation
- [Table of contents](https://github.com/maillotf/ardaccess-bridge-bundle/blob/master/docs/README.md)## Required configuration
### Modify framework.yaml
```yaml
ardaccess:
authentication:
protocol: "http"
host: "127.0.0.1"
port: "80"
username: "USERNAME"
password: "PASSWORD"
```### Modify services.yaml
```yaml
services:
MaillotF\Ardaccess\ArdaccessBridgeBundle\Service\ArdaccessService: '@ardaccess.service'
```## Package instalation with composer
```console
$ composer require maillotf/ardaccess-bridge-bundle
```## Use in controller:
```php
carrier->ListCarriers();
//Update a carrier
$apiAttributes = $aas->creator
->addAttribute('uid', 6078)
->addAttribute('rid', 794)
->addAttribute('firstname', 'Jean')
->addAttribute('lastname', 'Dupont')
->addAttribute('usergroup', '171,233')
->addAttribute('begindate', 946681200)
->addAttribute('enddate', 1627602000)
->addAttribute('country', 'France')
->getAttributes();
$attributes = $aas->carrier->Carrier(null, 'u', $apiAttributes);//Search with criterion
$criterions = $aas->creator
->newCriterion('date', '>', 946681200)
->addSubCriterion('example', '=', 'value')
->addCriterion()
->newCriterion('...', '=', '...')
->addCriterion()
->getCriterionsArray()
;
$result = $aas->supervision->ListEvents(null, $criterions);//Handback a smartobject
$smartobjectId = 2;
$success = $aas->getSmartObjectHelper()->handbackSmartObject($smartObjectId);
if ($success === true)
return ($this->json('OK'));
return ($this->json('Not Found', Response::HTTP_BAD_REQUEST));
}}
```[ico-license]: https://img.shields.io/github/license/maillotf/ardaccess-bridge-bundle.svg
[ico-version-stable]: https://img.shields.io/packagist/v/maillotf/ardaccess-bridge-bundle
[ico-php-version]: https://img.shields.io/packagist/php-v/maillotf/ardaccess-bridge-bundle[link-packagist]: https://packagist.org/packages/maillotf/ardaccess-bridge-bundle