src/Bigcommerce/Api/Client.php
private static function mapCollection($resource, $object)
    {
        if ($object == false || is_string($object)) {
            return $object;
        }

        $baseResource = __NAMESPACE__ . '\\' . $resource;
        self::$resource = (class_exists($baseResource)) ? $baseResource : 'Bigcommerce\\Api\\Resources\\' . $resource;

        return array_map(array('self', 'mapCollectionObject'), $object);
    }
private static function mapCollection($resource, $object)
    {
        if ($object == false || is_string($object)) {
            return $object;
        }

        $baseResource = __NAMESPACE__ . '\\' . $resource;
        self::$resource = (class_exists($baseResource)) ? $baseResource : 'Bigcommerce\\Api\\Resources\\' . $resource;

        return array_map(array('self', 'mapCollectionObject'), $object);
    }
private static function mapCollection ( $ resource , $ object ) { if ( $ object == false || is_string ( $ object ) ) { return $ object ; } $ baseResource = __NAMESPACE__ . '\\' . $ resource ; self :: $ resource = ( class_exists ( $ baseResource ) ) ? $ baseResource : 'Bigcommerce\\Api\\Resources\\' . $ resource ; return array_map ( array ( 'self' , 'mapCollectionObject' ) , $ object ) ; }
Internal method to wrap items in a collection to resource classes.

@param string $resource name of the resource class
@param array $object object collection
@return array
Internal method to wrap items in a collection to resource classes .