src/Architect.php
private function parseCollection(array $modes, $collection, &$root, $fullPropertyPath = '')
    {
        if (is_array($collection)) {
            foreach ($collection as $i => $resource) {
                $collection[$i] = $this->parseResource($modes, $resource, $root, $fullPropertyPath);
            }
        } elseif ($collection instanceof Collection) {
            $collection = $collection->map(function ($resource) use ($modes, &$root, $fullPropertyPath) {
                return $this->parseResource($modes, $resource, $root, $fullPropertyPath);
            });
        }

        return $collection;
    }
private function parseCollection(array $modes, $collection, &$root, $fullPropertyPath = '')
    {
        if (is_array($collection)) {
            foreach ($collection as $i => $resource) {
                $collection[$i] = $this->parseResource($modes, $resource, $root, $fullPropertyPath);
            }
        } elseif ($collection instanceof Collection) {
            $collection = $collection->map(function ($resource) use ($modes, &$root, $fullPropertyPath) {
                return $this->parseResource($modes, $resource, $root, $fullPropertyPath);
            });
        }

        return $collection;
    }
private function parseCollection ( array $ modes , $ collection , & $ root , $ fullPropertyPath = '' ) { if ( is_array ( $ collection ) ) { foreach ( $ collection as $ i => $ resource ) { $ collection [ $ i ] = $ this -> parseResource ( $ modes , $ resource , $ root , $ fullPropertyPath ) ; } } elseif ( $ collection instanceof Collection ) { $ collection = $ collection -> map ( function ( $ resource ) use ( $ modes , & $ root , $ fullPropertyPath ) { return $ this -> parseResource ( $ modes , $ resource , $ root , $ fullPropertyPath ) ; } ) ; } return $ collection ; }
Parse a collection using given modes
@param  array  $modes
@param  mixed $collection
@param  array $root
@param  string $fullPropertyPath
@return mixed
Parse a collection using given modes