package array-to-object
Convert an array to an object
sempro/array-to-object
Convert an array to an object
- Friday, November 3, 2017
- by sempro
- Repository
- 4 Watchers
- 1 Stars
- 28 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 22 % Grown
Array to object
, (*1)
Gives you a global function that converts arrays to objects without removing object references. The object also implements Jsonable which will prettify the output if the object is returned (This only works in Laravel)., (*2)
Installation
composer require sempro/array-to-object
Usage
$data = [
'id' => 1,
'name' => 'Test',
];
$object = arrayToObject($data);
$object->name; // 'Test'
License
The MIT License (MIT). Please see License File for more information., (*3)
dev-master
9999999-dev
Convert an array to an object
Sources
Download
MIT
The Requires
The Development Requires
by
Sempro AS
by
Runar Jørgensen
by
Smajo Husic
1.0.0
1.0.0.0
Convert an array to an object
Sources
Download
MIT
The Requires
The Development Requires
by
Sempro AS
by
Runar Jørgensen
by
Smajo Husic