src/BaiduBce/Services/Bos/BosClient.php
public function listObjects($bucketName, $options = array())
    {
        list($config, $maxKeys, $prefix, $marker, $delimiter) =
            $this->parseOptions(
                $options,
                BosOptions::CONFIG,
                BosOptions::MAX_KEYS,
                BosOptions::PREFIX,
                BosOptions::MARKER,
                BosOptions::DELIMITER
            );
        $params = array();
        if ($maxKeys !== null) {
            if (is_numeric($maxKeys)) {
                $maxKeys = number_format($maxKeys);
                $maxKeys = str_replace(',','',$maxKeys);
            }
            $params[BosOptions::MAX_KEYS] = $maxKeys;
        }
        if ($prefix !== null) {
            $params[BosOptions::PREFIX] = $prefix;
        }
        if ($marker !== null) {
            $params[BosOptions::MARKER] = $marker;
        }
        if ($delimiter !== null) {
            $params[BosOptions::DELIMITER] = $delimiter;
        }

        return $this->sendRequest(
            HttpMethod::GET,
            array(
                BosOptions::CONFIG => $config,
                'bucket_name' => $bucketName,
                'params' => $params
            )
        );
    }
public function listObjects($bucketName, $options = array())
    {
        list($config, $maxKeys, $prefix, $marker, $delimiter) =
            $this->parseOptions(
                $options,
                BosOptions::CONFIG,
                BosOptions::MAX_KEYS,
                BosOptions::PREFIX,
                BosOptions::MARKER,
                BosOptions::DELIMITER
            );
        $params = array();
        if ($maxKeys !== null) {
            if (is_numeric($maxKeys)) {
                $maxKeys = number_format($maxKeys);
                $maxKeys = str_replace(',','',$maxKeys);
            }
            $params[BosOptions::MAX_KEYS] = $maxKeys;
        }
        if ($prefix !== null) {
            $params[BosOptions::PREFIX] = $prefix;
        }
        if ($marker !== null) {
            $params[BosOptions::MARKER] = $marker;
        }
        if ($delimiter !== null) {
            $params[BosOptions::DELIMITER] = $delimiter;
        }

        return $this->sendRequest(
            HttpMethod::GET,
            array(
                BosOptions::CONFIG => $config,
                'bucket_name' => $bucketName,
                'params' => $params
            )
        );
    }
public function listObjects ( $ bucketName , $ options = array ( ) ) { list ( $ config , $ maxKeys , $ prefix , $ marker , $ delimiter ) = $ this -> parseOptions ( $ options , BosOptions :: CONFIG , BosOptions :: MAX_KEYS , BosOptions :: PREFIX , BosOptions :: MARKER , BosOptions :: DELIMITER ) ; $ params = array ( ) ; if ( $ maxKeys !== null ) { if ( is_numeric ( $ maxKeys ) ) { $ maxKeys = number_format ( $ maxKeys ) ; $ maxKeys = str_replace ( ',' , '' , $ maxKeys ) ; } $ params [ BosOptions :: MAX_KEYS ] = $ maxKeys ; } if ( $ prefix !== null ) { $ params [ BosOptions :: PREFIX ] = $ prefix ; } if ( $ marker !== null ) { $ params [ BosOptions :: MARKER ] = $ marker ; } if ( $ delimiter !== null ) { $ params [ BosOptions :: DELIMITER ] = $ delimiter ; } return $ this -> sendRequest ( HttpMethod :: GET , array ( BosOptions :: CONFIG => $ config , 'bucket_name' => $ bucketName , 'params' => $ params ) ) ; }
Get Object Information of bucket.

@param string $bucketName The bucket name.
@param mixed $options The optional bce configuration, which will overwrite the
default configuration that was passed while creating BosClient instance.
@property number $maxKeys The default value is 1000.
@property string $prefix The default value is null.
@property string $marker The default value is null.
@property string $delimiter The default value is null.
@property mixed $config The optional bce configuration, which will overwrite the
default configuration that was passed while creating BosClient instance.
@return mixed
Get Object Information of bucket .