vgleb/object-array

This package is abandoned and no longer maintained. No replacement package was suggested.

Object behavior for Array

v0.9.1 2015-06-23 14:34 UTC

This package is not auto-updated.

Last update: 2022-11-26 08:40:25 UTC


README

Install

Install this package through Composer

$ composer require vgleb/object-array

Laravel 5 Implementation

Add a reference to LaravelObjectArrayServiceProvider to the providers array in config/app.php:

'providers' => [
    'VGleb\ObjectArray\LaravelObjectArrayServiceProvider',
]

Then you can "make" (or inject) a ObjectArray instance anywhere in your app:

$oa = \App::make('VGleb\ObjectArray\ObjectArray', [$array]);

or

use VGleb\ObjectArray\ObjectArray;

Usage

$oa = new ObjectArray([
    'foo' => 'bar',
    'oa'  => new ObjectArray(['foo' => 'bar']),
]);

echo $oa->foo;
echo $oa->oa->foo;

Change log

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email i@h0n.ru instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.