public function list_object($bucket, $opt = array())
{
$this->assertParameterArray($opt);
$opt[self::BUCKET] = $bucket;
if (empty($opt[self::BUCKET])) {
throw new BCS_Exception("Bucket should not be empty, please check", -1);
}
$opt[self::METHOD] = 'GET';
$opt[self::OBJECT] = '/';
$opt[self::QUERY_STRING] = array();
if (isset($opt['start']) && is_int($opt['start'])) {
$opt[self::QUERY_STRING]['start'] = $opt['start'];
}
if (isset($opt['limit']) && is_int($opt['limit'])) {
$opt[self::QUERY_STRING]['limit'] = $opt['limit'];
}
if (isset($opt['prefix'])) {
$opt[self::QUERY_STRING]['prefix'] = rawurlencode($opt['prefix']);
}
$response = $this->authenticate($opt);
$this->log($response->isOK() ? "List object success!" : "Lit object failed! Response: [" . $response->body . "]", $opt);
return $response;
}