Scalr\Service\Aws\S3\DataType\BucketData::getObject PHP Method

getObject() public method

This implementation of the GET operation retrieves objects from Amazon S3. To use GET, you must have READ access to the object. If you grant READ access to the anonymous user, you can return the object without using an authorization header.
public getObject ( string $objectName, array $requestPars = null, array $requestHeaders = null ) : ClientResponseInterface
$objectName string An object key name.
$requestPars array optional An additional request query parameters. It accepts only allowed params.
$requestHeaders array opitional An optional request headers. It accepts only allowed headers.
return ClientResponseInterface Returns response
    public function getObject($objectName, array $requestPars = null, array $requestHeaders = null)
    {
        $this->throwExceptionIfNotInitialized();
        return $this->getS3()->object->download($this->bucketName, $objectName, $requestPars, $requestHeaders);
    }