In addition to the interfaces described above,
Zend_Service_Amazon_S3 also supports operating as a stream
wrapper. For this, you need to register the client object as the stream wrapper:
Example 757. Zend_Service_Amazon_S3 Streams Example
<?php
require_once 'Zend/Service/Amazon/S3.php';
$s3 = new Zend_Service_Amazon_S3($my_aws_key, $my_aws_secret_key);
$s3->registerStreamWrapper("s3");
mkdir("s3://my-own-bucket");
file_put_contents("s3://my-own-bucket/testdata", "mydata");
echo file_get_contents("s3://my-own-bucket/testdata");
Directory operations (mkdir, rmdir, opendir,
etc.) will operate on buckets and thus their arguments should be of the form of
s3://bucketname. File operations operate on objects. Object creation,
reading, writing, deletion, stat and directory listing is supported.




