register ( $s3, $protocol )

Registers the S3StreamWrapper class as a stream wrapper.

Access

public static

Parameters

Parameter

Type

Required

Description

$s3

AmazonS3

Optional

An instance of the AmazonS3 client.

$protocol

string

Optional

The name of the protocol to register.

Returns

Type

Description

boolean

Whether or not the registration succeeded.

Source

Method defined in extensions/s3streamwrapper.class.php | Toggle source view (6 lines) | View on GitHub

public static function register(AmazonS3 $s3 = null, $protocol = 's3')
{
    S3StreamWrapper::$_clients[$protocol] = $s3 ? $s3 : new AmazonS3();

    return stream_wrapper_register($protocol, 'S3StreamWrapper');
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback