To install the Ivory Serializer library, you will need Composer. It's a PHP 5.3+ dependency manager which allows you to declare the dependent libraries your project needs and it will install & autoload them for you.
Composer comes with a simple phar file. To easily access it from anywhere on your system, you can execute:
$ curl -s https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
Require the library in your composer.json
file:
$ composer require egeloen/serializer
The Ivory Serializer relies on third libraries in order to not reinvent the wheel...
The Doctrine annotations library allows you to use the annotations mapping on your classes.
$ composer require doctrine/annotations
The Symfony event dispatcher library allows you to hook into the (de)-serialization.
$ composer require symfony/event-dispatcher
The Symfony property info library allows you to get a more efficient mapping discovery.
$ composer require symfony/property-info
The Symfony property access library allows you to get/set values from your objects.
$ composer require symfony/property-access
The Symfony yaml library allows you to use the yaml format in your mapping or your (de)-serialization.
$ composer require symfony/yaml
So easy, you just have to require the generated autoload file and you are already ready to play:
<?php
require __DIR__.'/vendor/autoload.php';
use Ivory\Serializer\Serializer;
// ...
The Ivory Serializer library follows the PSR-4 Standard. If you prefer install it manually, it can be autoload by any convenient autoloader.