Download the PHP package fundacion-ciudad-del-saber/ivvy-sdk-php without Composer
On this page you can find all versions of the php package fundacion-ciudad-del-saber/ivvy-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fundacion-ciudad-del-saber/ivvy-sdk-php
More information about fundacion-ciudad-del-saber/ivvy-sdk-php
Files in fundacion-ciudad-del-saber/ivvy-sdk-php
Package ivvy-sdk-php
Short Description A PHP 7.1 compatible, PSR-4 and PSR-2 compliant SDK to work with iVvy's API 1.0
License MIT
Informations about the package ivvy-sdk-php
ivvy-sdk-php
A PSR-4 compilant SDK to work with iVvy's API 1.0
Installation
Install through composer.
How to use?
This package exposes 2 high level APIs through the classes Ivvy
and JobFactory
. It is important that you understand this, as this package is designed for you to work mainly these 2 classes and the entities inside the Fcds\Ivvy\Model
namespace.
The Ivvy
class is your client class to communicate with iVvy. It exposes endpoints that directly map to a namespace's action (as per iVvys API 1.0 docs).
The JobFactory
class is a special class that is supposed to work with iVvy's asynchronous job queue on the batch
namespace, specifically with the run
action. It basically abstracts the creation of jobs to be sent. By the release 0.1.0
, there is no factory or "easy" way to instantiate this class, so we just pass all the concrete dependencies.
In the particular case of jobs that are for adding or updating entities, JobFactory will call the validation methods on those entities, passing the corresponding specification. In simple words, it will throw a BusinessRuleException
whenever you're trying to create a job using an entity that doesn't holds the appropriate values for said job. (I.E: you try to update a company, but the company object has no ID set).