phppro / sdk
This package is abandoned and no longer maintained.
No replacement package was suggested.
PHPPRO SDK
1.5.3
2016-01-13 10:36 UTC
Requires
- symfony/form: ~2.0|~3.0
Requires (Dev)
- escapestudios/symfony2-coding-standard: ~2.0
- guzzlehttp/guzzle: ~5.0
- jms/security-extra-bundle: ~1.0
- phploc/phploc: ~2.0
- phpunit/phpunit: ~5.0
- symfony/config: ~2.0|~3.0
- symfony/dependency-injection: ~2.0|~3.0
- symfony/http-foundation: ~2.0|~3.0
- symfony/http-kernel: ~2.0|~3.0
- symfony/security: ~2.0|~3.0
- twig/twig: ~1.0
- zendframework/zenddiagnostics: ~1.0
README
This repository contains the PHP SDK and Symfony 2 SDK Bundle that allows you to access any API that conforms to PHPPRO's API rules.
Usage
Symfony 2 integration (SDK Bundle)
This version of the bundle requires Symfony 2.5+.
Installation
Installation is a quick 4 step process:
- Download phppro/sdk using composer
- Enable the Bundle
- Configure your application's security.yml
- Configure the SdkBundle
Step 1: Download phppro/sdk using composer
Add phppro/sdk dependency to your composer.json :
# composer.json { "require": { "phppro/sdk": "1.*" }, ... }
Then update:
$ php composer.phar update phppro/sdk
Composer will install the bundle to your project's vendor/phppro/sdk
directory and additional required
packages.
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Phppro\Sdk\SdkBundle(), ); }
Step 3: Configure your application's security.yml
# app/config/security.yml security: encoders: phppro\Common\SdkBundle\Security\User\ApiUser: id: sdk.api.password_encoder role_hierarchy: ... providers: api: id: sdk.api.user_provider firewalls: ...
Step 4: Configure the phpproCommonSdkBundle
# app/config/config.yml phppro_common_sdk: host: "%api.host%" login: "%api.login%" password: "%api.password%" clientId: "%api.clientId%"
You can then add all the %api.*% parameters into your app/config/parameters.yml(.dist) :
# app/config/parameters.yml # contact phppro dev team to obtain the appropriate host name api.host: api.phppro.com # contact phppro dev team to obtain the appropriate login name api.login: mylogin # contact phppro dev team to obtain the appropriate password hash api.password: abcd1234... # contact phppro dev team to obtain the appropriate client id api.clientId: myclient
More bundle configuration parameters are available but optional (redis cache for token, ...)
Next Steps
Contact the phppro dev team for further information.