Php 找不到类日历

Php 找不到类日历,php,google-calendar-api,Php,Google Calendar Api,我想用这段代码在谷歌日历上添加一个日历 function addCalendar($client, $nomeInsegnamento, $codiceInsegnamento){ $calendar = new Calendar(); $calendar->setSummary($nomeInsegnamento." - ".$codiceInsegnamento); $calendar->setTimeZone('Europe/Rome'); re

我想用这段代码在谷歌日历上添加一个日历

function addCalendar($client, $nomeInsegnamento, $codiceInsegnamento){
    $calendar = new Calendar();
    $calendar->setSummary($nomeInsegnamento." - ".$codiceInsegnamento);
    $calendar->setTimeZone('Europe/Rome');
    return $client -> calendars -> insert($calendar);
}
我已经为PHP导入了GoogleAPI库

require_once '../src/Google_Client.php';
require_once '../src/contrib/Google_CalendarService.php';
但它总是得到这个错误

Fatal error: Class 'Calendar' not found in D:\Programmi\EasyPHP-DevServer-13.1VC9\data\localweb\projects\GCE\prova.php on line 182

Google\u CalendarService.php
中没有这样的类
Calendar


您可能想签出

好的,我看到文档非常不完整。现在我要导入什么类<代码>$client=新的Google_客户端(数组('use_objects'=>true))$cal=新的谷歌日历服务($client);函数addCalendar($cal、$NomeInsignanto、$CodiceInsignanto){$calendar=new calendar();$calendar->setSummary($NomeInsignanto.-“$CodiceInsignanto);$calendar->setTimeZone('Europe/Rome');返回$calendar->calendars->insert($calendar);}相同的类:
Google\u CalendarService.php
,因为我在
$client=new Google\u客户端(array('use\u objects'=>true))中也遇到了相同的错误
So
Google_Client.php
未正确包含(可能是错误路径或其他东西-查看警告)不,它位于正确位置
require_once'../src/Google_Client.php';需要_once'../src/contrib/Google_CalendarService.php'与Oauth 2.0的连接工作正常,我不知道,因为它没有正确找到库。是否要查看所有代码?