Skip to content
Laurynas Veržukauskas edited this page Mar 27, 2014 · 20 revisions

Library usage consists of 3 steps. Process always starts with initialization, followed by transformations and optional retrieval.

1. Initialization

When you start chain using some value.

Underscore::from($array)-> /*...*/

2. Transformations

Where you perform various transformations with the data.

/*...*/->pick('foo')->reduce(/*...*/)-> /*...*/

3. Retrieval

Where you extract data from Underscore.

$data = /*...*/->value();

Clone this wiki locally