In Google documentation ( https://developers.google.com/drive/v2/reference/files/insert ) has the following code snippets:
$file = new Google_DriveFile();
...
$parent = new ParentReference();
I am getting error in Fatal error: Class 'ParentReference' not found. I grepped the google-api-php-client for ParentReference.
lib: grep -R ParentReference ./ | grep class
.../Google_DriveService.php:class Google_ParentReference extends Google_Model {
It is seems that there are some prefix “Google_” added and ParentReference is renamed to *Google_ParentReference* .
My conclusion is right? Is there something else I couldn’t understand?
Yes, you’re right.
If you’ll download latest SDK for PHP you can check that almost all classes have the prefix Google_.
For example, in folder
\src\contrib\Google_DriveService.phpyou will find the definition of Google_ParentReference.Also check Parents: insert (Google Drive SDK).