Skip to content

Class: Nether\Object\Datastore

Bob Magic II edited this page Aug 18, 2021 · 14 revisions

This class is a wrapper for arrays to allow datasets to be treated as both arrays and objects with chainable helper methods.

$Dataset = [
	'Captain'         => 'Benjamin Sisko',
	'Chief Engineer'  => 'Miles O\'Brien',
	'Science Officer' => 'Jadzia Dax'
];

$Data = new Nether\Object\Datastore($Dataset);

var_dump($Data);
object(Nether\Object\Datastore)#3 (3) {
  ["Captain"]=>
  string(14) "Benjamin Sisko"
  ["Chief Engineer"]=>
  string(13) "Miles O'Brien"
  ["Science Officer"]=>
  string(10) "Jadzia Dax"
}
Clone this wiki locally