2017 © Pedro Peláez
 

package array-to-object

Convert an array to an object

image

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

The README.md

Array to object

Latest Version on Packagist Software License Build Status Total Downloads, (*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

  1. 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)

The Versions

03/11 2017

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

03/11 2017

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