SDK for PHP 3.x

S3UriParser
in package

Extracts a region, bucket, key, and and if a URI is in path-style

Table of Contents

Methods

parse()  : array<string|int, mixed>
Parses a URL or S3 StreamWrapper Uri (s3://) into an associative array of Amazon S3 data including:

Methods

parse()

Parses a URL or S3 StreamWrapper Uri (s3://) into an associative array of Amazon S3 data including:

public parse(string|UriInterface $uri) : array<string|int, mixed>
  • bucket: The Amazon S3 bucket (null if none)
  • key: The Amazon S3 key (null if none)
  • path_style: Set to true if using path style, or false if not
  • region: Set to a string if a non-class endpoint is used or null.
Parameters
$uri : string|UriInterface
Tags
throws
InvalidArgumentException|InvalidArnException
Return values
array<string|int, mixed>
On this page