1 | <?php |
||
5 | class GoogleClientFactory |
||
6 | { |
||
7 | private $path; |
||
8 | |||
9 | public function __construct($path) |
||
13 | |||
14 | public function createCalendar($scopeType, $role) |
||
15 | { |
||
16 | $calendar = new \Google_Service_Calendar($this->createClient()); |
||
17 | |||
18 | $calendar->acl->insert('primary', $this->aclRule($scopeType, $role)); |
||
19 | |||
20 | return $calendar; |
||
21 | } |
||
22 | |||
23 | private function createClient() |
||
31 | |||
32 | private function aclRule($scopeType, $role) |
||
44 | } |
||
45 |