Download the PHP package api-clients/hydrator without Composer

On this page you can find all versions of the php package api-clients/hydrator. 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 hydrator

Hydrator for API Clients for PHP 7.x

License Linux BuildBuild Status Windows BuildBuild status Code Coverage Latest Stable Version Total Downloads PHP 7 ready

In a nutshell this package is a wrapper around ocramius/generated-hydrator adding some annotations for nesting, collections, and renaming properties.

Install

To install via Composer, use the command below, it will automatically detect the latest version and bind it with ^.

Preheating

In order to ensure the hydrator doesn't block the hydrator comes with a preheat method. Give it a the path of a namespace and the namespace it self, and it will create a hydrator for each resource it finds plus read the annotations for the given resource. This ensures all disk IO and heavy CPU operations have been completed before using the hydrator. When using the hydrator in async code the hydrator should, preferable, be created before running the loop.

Set up

Before using the Hydrator it has to be set up, note that using this method of setting up it will also preheat the hydrator.

Hydrating

The hydrator offers two methods of hydrating. The first is a method that accepts FQCN (Fully Qualified Class Name), for example ApiClients\Client\Github\Resource\Async\Emoji or Emoji::class for short, and the JSON holding the resource contents.

Or when you've configured Options::NAMESPACE, Options::NAMESPACE_SUFFIX you can do the same with the hydrate method, which internally uses hydrateFQCN:

Extracting

A resource can also be broken down again into JSON with the hydrator.

Same magic as the hydrate method applies to the extract method, this does exactly the same as extractFQCN when Options::NAMESPACE and Options::NAMESPACE_SUFFIX are configured.

Options

Options::ANNOTATIONS

Supply an array with extra annotations in the format key => annotation, value => handler.

Options::ANNOTATION_CACHE_DIR

Cache directory for resource annotations.

Options::NAMESPACE

Base namespace where the resources reside, required.

Options::NAMESPACE_DIR

Filesystem path to the base namespace where the resources reside, required.

Options::NAMESPACE_SUFFIX

Namespaces suffix, useful for different types of the same resource.

Options::RESOURCE_CACHE_DIR

Cache directory for resource generated resources.

Options::RESOURCE_NAMESPACE

Namespace for generated resources.

License

The MIT License (MIT)

Copyright (c) 2017 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of hydrator with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
api-clients/command-bus Version ^2.0
api-clients/resource Version ^3.0.1
doctrine/annotations Version ^1.2
doctrine/cache Version ^1.6
ocramius/generated-hydrator Version ^3.0 || ^2.0
react/promise Version ^2.7
wyrihaximus/doctrine-annotation-autoloader Version ^1.0
wyrihaximus/ticking-promise Version ^2 || ^1.6
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 api-clients/hydrator contains the following files

Loading the files please wait ....