Download the PHP package vox/restfull-client-mapper without Composer

On this page you can find all versions of the php package vox/restfull-client-mapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package restfull-client-mapper

Scrutinizer Code Quality Code Coverage Build Status Build Status

Rest Mapper

A Restfull Resource Relational Mapper

1. Instalation

2. Creating a Transfer Manager

3.1. Using the TransferManagerBuilder

The builder class enables a more configuration style creation of the transfer manager.

The most basic setup would be the following, to obtain a manager with annotations driver, with no caching system:

to add caching system simply change it on the builder

to create with yml driver:

3.2 Using transactional mode

Sometimes, you need things to be rolled back when something goes wrong just like you can using a database. That behavior is possible with RRM too. Using the builder just call the method isTransactional.

Now, when something goes wrong, the manager will try to restore all data by doing posts, updates and deletions to the previows values on your webservice

3. Mapping a Transfer

3.1. the yml driver

if you want to leave the mapping metadata out of your object to keep it clean or keep it decoupled from this lib you can also use the yml metadata reader

3.1.1 - Yml mapping

the yml mapping must be named after the complete class namespace replacing backslashes by dots. Ex: /propject/metadata/Project.Package.ClassName.yml

3.2. Composite Ids

Composite id's are supported, however there are some limitations.

To map composite ids using annotations is really simple

The yaml mapping is also trivial

3.2.1 Mapping relationships with composite ids transfers

For now it is only possible to map belongs to relationships when linking to a composite ids transfer.

There are some limitations however, never use setters for ids or else it will not be able to post new transfers. new transfers needs to pull the ids from the foreign keys automaticaly by the unity of work

4. Using the Transfer Manager

5. Iri relationships support

if your webservice uses iri relationships, you can map it using the following

or with Yaml

the iriCollectionField is the field that conatiains an array of iri addresses, a collection of objects will be created as soon as you call the relatedTransfers, but have in mind, it will call the webservice one by one.

The other situations like belongs to, will be taken care automaticaly, just map as commom relationships, the lib detects if its an iri address using a regexp that looks for the format ".+/.+$"

6. Doctrine Interop

This lib uses the doctrine commom interfaces, so you can do code wich is interoperable with doctrine. The annotation mapping however is completely different, hence the use of the yaml mapping is encouraged (also using yml or xml mapping for doctrine projects is also encouraged, in order to create a domain decoupled from the framework)

7. The event system

The event system is made to be compatible with doctrine's, so you can have easy time importing plain objects from other system and have its events on your consumer

Create a listener class

Register the listener

Limitations


All versions of restfull-client-mapper with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
jms/metadata Version ^1
doctrine/annotations Version ^1
symfony/serializer Version ^3
guzzlehttp/guzzle Version ^6
symfony/yaml Version ^3
ocramius/proxy-manager Version ^2.0|^2
doctrine/common Version ^2.7|^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vox/restfull-client-mapper contains the following files

Loading the files please wait ....