| 1 | <?php |
||
| 8 | class AwsS3Resolver extends BaseAwsS3Resolver |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Constructs a cache resolver storing images on Amazon S3. |
||
| 12 | * |
||
| 13 | * @param S3Client $storage The Amazon S3 storage API. It's required to know authentication information. |
||
| 14 | * @param string $bucket The bucket name to operate on. |
||
| 15 | * @param string $acl The ACL to use when storing new objects. Default: owner read/write, public read |
||
| 16 | * @param array $objUrlOptions A list of options to be passed when retrieving the object url from Amazon S3. |
||
| 17 | */ |
||
| 18 | public function __construct(S3Client $storage, $bucket, $acl = "public-read", array $objUrlOptions = array()) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Returns the object path within the bucket. |
||
| 28 | * |
||
| 29 | * @param string $path The base path of the resource. |
||
| 30 | * @param string $filter The name of the imagine filter in effect. |
||
| 31 | * |
||
| 32 | * @return string The path of the object on S3. |
||
| 33 | */ |
||
| 34 | protected function getObjectPath($path, $filter) |
||
| 43 | } |
||
| 44 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: