public static function buildFromArray(array $resources)
    {
        $resource = @$resources[0];

        if (!$resource instanceof EntityResource) {
            throw new LogicException(self::ERROR_EMPTY_ARRAY);
        }

        return new static($resources, $resource->getMetadata());
    }
public static function buildFromArray(array $resources)
    {
        $resource = @$resources[0];

        if (!$resource instanceof EntityResource) {
            throw new LogicException(self::ERROR_EMPTY_ARRAY);
        }

        return new static($resources, $resource->getMetadata());
    }
public static function buildFromArray ( array $ resources ) { $ resource = @ $ resources [ 0 ] ; if ( ! $ resource instanceof EntityResource ) { throw new LogicException ( self :: ERROR_EMPTY_ARRAY ) ; } return new static ( $ resources , $ resource -> getMetadata ( ) ) ; }
Factory method para construir a partir de un array de EntityResource.
@param arary $resources
Factory method para construir a partir de un array de EntityResource .