src/Core/StackCollection.php
public static function createFromJsonResponse($data)
    {
        $data = json_decode($data, true);

        $stacks = array_map(function ($stack) {
            return Stack::createFromDecodedJsonResponse($stack);
        }, $data['items']);

        return new self($stacks);
    }
public static function createFromJsonResponse($data)
    {
        $data = json_decode($data, true);

        $stacks = array_map(function ($stack) {
            return Stack::createFromDecodedJsonResponse($stack);
        }, $data['items']);

        return new self($stacks);
    }
public static function createFromJsonResponse ( $ data ) { $ data = json_decode ( $ data , true ) ; $ stacks = array_map ( function ( $ stack ) { return Stack :: createFromDecodedJsonResponse ( $ stack ) ; } , $ data [ 'items' ] ) ; return new self ( $ stacks ) ; }
Create a stack from the JSON data returned by the rokka.io API.

@param string $data JSON data

@return StackCollection
Create a stack from the JSON data returned by the rokka . io API .