2017 © Pedro Peláez
 

library data-chain

structure data

image

rde/data-chain

structure data

  • Thursday, July 9, 2015
  • by benjaminchen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

DataChain

Purpose

Making data structural and easy to use., (*1)

Usage

First instantiate DataChain with your data as a argument. Your data can be array, object, string, etc., (*2)

use Rde\DataChain;

$yourData = array(
    'a' => 'test',
    'b' => array(
        'c' => 'end'
    )
);

$dataChain = new DataChain($yourData);

// get dataChain object
$dataChain->a;

// get value of a, this will get 'test'
$dataChain->a->value();

// get multi layer value, this will get 'end'
$dataChain->b->c->value();

// When the key is not set, it will return dataChain object
$dataChain->a->d;

// When get the value of non-existent key will return null
$dataChain->a->d->value();

The Versions

09/07 2015

dev-master

9999999-dev

structure data

  Sources   Download

MIT

The Requires

  • php >= 5.3

 

The Development Requires

by benjamin

09/07 2015

v0.1

0.1.0.0

structure data

  Sources   Download

MIT

The Requires

  • php >= 5.3

 

The Development Requires

by benjamin