コード例 #1
0
 /**
  * Constructor.
  *
  * @throws KeyNotFoundException
  *
  * @param CalendarHelper $calendarHelper
  */
 public function __construct(CalendarHelper $calendarHelper)
 {
     $this->calendarHelper = $calendarHelper;
     $this->calendarId = $this->calendarHelper->getConfig('google.default_calendar_id');
     $this->clientId = $this->calendarHelper->getConfig('google.client_id');
     $this->applicationName = $this->calendarHelper->getConfig('google.application_name');
     $this->serviceAccountName = $this->calendarHelper->getConfig('google.service_account_name');
     $this->scopes = $this->calendarHelper->getConfig('google.scopes');
     try {
         $this->key = File::get($this->calendarHelper->getConfig('google.key'));
     } catch (FileNotFoundException $e) {
         $message = trans('calendar-helper::exceptions.KeyNotFoundException', ['path' => $this->calendarHelper->getConfig('google.key')]);
         throw new KeyNotFoundException($message);
     }
     $this->setUp();
 }
コード例 #2
0
 public function __construct(CalendarHelper $calendar, TableCollection $collection)
 {
     $this->calendar = $calendar->google();
     $this->collection = $collection;
 }
コード例 #3
0
ファイル: _ide_helper.php プロジェクト: svuvis/forumsite
 /**
  * Returns a calendar helper configuration value.
  *
  * @param int|string $key
  * @return mixed 
  * @static 
  */
 public static function getConfig($key)
 {
     return \Stevebauman\CalendarHelper\CalendarHelper::getConfig($key);
 }