ALIOSS::get_object_meta PHP Method

get_object_meta() public method

获得object的meta信息
Since: 2011-11-14
public get_object_meta ( string $bucket, string $object, string $options = null ) : ResponseCore
$bucket string (Required)
$object string (Required)
$options string (Optional)
return ResponseCore
    public function get_object_meta($bucket, $object, $options = null)
    {
        //options
        $this->validate_options($options);
        if (!$options) {
            $options = array();
        }
        //bucket
        $this->is_empty($bucket, OSS_BUCKET_IS_NOT_ALLOWED_EMPTY);
        //object
        $this->is_empty($object, OSS_OBJECT_IS_NOT_ALLOWED_EMPTY);
        $options[self::OSS_BUCKET] = $bucket;
        $options[self::OSS_METHOD] = 'HEAD';
        $options[self::OSS_OBJECT] = $object;
        $response = $this->auth($options);
        return $response;
    }