mprzytulski / arrow-path

Simple array wrapper exposing '->' to data

Repository from Github https://github.commprzytulski/arrow-pathRepository from Github https://github.commprzytulski/arrow-path

Array Path

Simple access array with -> notation.

Examples

Basic example

$arrow = new Arrow(['something' => 1]);
echo $arror->something; 

Output:

1

Use naive mode

$arrow = new Arrow(['something' => 1], true);
echo $arror->something->otherthing; 

Output:

''

Get original value

$arrow = new Arrow(['something' => 1], true);
var_dump($arror->something()); 

Output:

int(1)

About

Simple array wrapper exposing '->' to data


Languages

Language:PHP 100.0%