The PHP client library can work in two ways and return objects or associative arrays, the latter being the default.
The examples in the documentation assume that you want the library to return objects, otherwise you will have to replace the following two calls:
$files->getItems() $files->getNextPageToken()
with corresponding calls that use associative arrays instead:
$files['items'] $files['nextPageToken']
Even better, you can set up the library to always return objects by setting
$apiConfig['use_objects'] = true;
Please check the config.php for additional configuration options:
http://code.google.com/p/google-api-php-client/source/browse/trunk/src/config.php
source share