CakePHP wrapper for erwane/openagenda-api package.
| version | OpenAgenda-API Package | CakePHP | PHP min |
|---|---|---|---|
| 1.3.* | 3.0.* | ^3.10 | PHP 7.2 |
| 1.4.* | 3.0.* | ^4.2 | PHP 7.4 |
| 2.4.* | ^3.1 | ^4.2 | PHP 8.0 |
| 2.5.* | ^3.1 | ^5.0 | PHP 8.1 |
composer require erwane/openagenda-wrapper-cakephpuse Cake\Cache\Cache;
use OpenAgenda\OpenAgenda;
use OpenAgenda\Wrapper\CakeWrapper
// PSR-18 Http client.
$wrapper = new CakeWrapper($guzzleOptions);
// PSR-16 Simple cache. Optional
$cache = Cache::pool('default');
// Create the OpenAgenda client. The public key is required for reading data (GET)
// The private key is optional and only needed for writing data (POST, PUT, DELETE)
$oa = new OpenAgenda([
'public_key' => 'my public key', // Required
'secret_key' => 'my secret key', // Optional, only for create/update/delete
'wrapper' => $wrapper, // Required
'cache' => $cache, // Optional
'defaultLang' => 'fr', // Optional
]);Check OpenAgenda API lib for details.