Download the PHP package redbox/hydrate without Composer

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

redbox-logo-klein

Build Status codecov Scrutinizer Code Quality PHP 7.1 Ready ![HHVM Ready](https://img.shields.io/badge/PHP 7.1-Ready-green.svg) ![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&label=Contact author)

Redbox-hydrate

Hydrating an object is fancy talk for populating properties on PHP objects. This Hydrator helps you to quickly hydrate new class instances and returns the populated result. Please note it does not mether if you have private or protected properties in your class it will take care of that for you. Look in the examples folder for basic examples.

Examples

I have gone to great length to provide a special (read sexy) and tiny API for you. You can use any kind of API style you see fit in your operation for example.

Static class method

In this example we will hydrate a new instance of class User and return it as $result1 using with with() function.

Hydrate function

Instantiate a new Hydrator

Plain old PHP, create your instance of the hydrator then call the with( ) method.

Please note There is something off with this method. If your doing this inside a loop it might consume some memory because of all the instances you create. Please don't forget to use the unset function if you are inside any kind of loop.

System Requirements

Below are the minimum requirements to use this package:

Installation

Using composer:

Installation trough archive download

If you download the package from a website (for example github.io or phpclasses.org or any other) you will need composer installed on your machine. The reason for this is that Redbox-hydrate comes without the vendor directory which is required to run the package.

First of all if you don't have composer installed you can find it here. Follow the instructions and please don't get intimidated in fact its really really easy to install.

In the this sample i will assume you have composer installed (on any machine). Go to the package root (where composer.json is located) and execute the following command.

Now your almost ready to go. In your project require the redbox-hydrate.php (located in the package root). Assuming that Redbox-hydrate was installed in ./lib/redbox-hydrate/ your php file would look like this.

And you are ready use Redbox-hydrate in your application.

Author

Redbox-hydrate is created and maintained by Johnny Mast. For feature requests or suggestions you could consider sending me an e-mail.

License

Redbox-hydrate is released under the MIT public license.

https://github.com/johnnymast/redbox-hydrator/blob/master/LICENSE.md

Enjoy

Oh and if you've come down this far, you might as well follow me on twitter.


All versions of hydrate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
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 redbox/hydrate contains the following files

Loading the files please wait ....