承接 davaxi/google_event_template 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davaxi/google_event_template

Composer 安装命令:

composer require davaxi/google_event_template

包简介

PHP Class to generate Google Calendar Event link

README 文档

README

PHP Class to generate Google Calendar Event link

Build Status Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available

Installation

This page contains information about installing the Library for PHP.

Requirements

  • PHP version 5.3.0 or greater (including PHP 7)

Obtaining the client library

There are two options for obtaining the files for the client library.

Using Composer

You can install the library by adding it as a dependency to your composer.json.

  "require": {
    "davaxi/google_event_template": "^1.0"
  }

Cloning from GitHub

The library is available on GitHub. You can clone it into a local repository with the git clone command.

git clone https://github.com/davaxi/Google_Event_Template.git

What to do with the files

After obtaining the files, ensure they are available to your code. If you're using Composer, this is handled for you automatically. If not, you will need to add the autoload.php file inside the client library.

require '/path/to/google_event_template/folder/autoload.php';

Usage

<?php

require '/path/to/google_event_template/folder/autoload.php';

$event = new Davaxi\Google_Event_Template();
$event->setTimeZone('Europe/Paris');
$event->setStartDate('2016-10-01 12:00:00');
$event->setEndDate('2016-10-01 14:00:00');
$event->setTitle('My Event Title');

$url = $event->getUrl();

printf('<a href="%s" target="_blank">Add event to Google Calendar</a>', $url);

Documentation

<?php

$event = new Davaxi\Google_Event_Template();

// Required fields //

// Event title
$event->setTitle('My Event Title');

// Event timeZone
$event->setTimeZone('Europe/Paris');

// Event start date in specified TimeZone
$event->setStartDate('2016-10-01 12:00:00');

// Event end date in specified TimeZone
$event->setEndDate('2016-10-01 14:00:00');

// Optional fields //
// Event description
$event->setDescription('My Event Description');

// Event Location
$event->setLocation('My Location');

// Set event as busy (true) (default available (false))
$event->eventHasBusy();

// This is not covered by Google help but is an optional 
// parameter in order to add an event to a shared calendar 
// rather than a user's default
$event->setOwnerEmail('root@domain.com');
// or 
$event->setOwnerEmail('root@localhost');
 
// Add event Guest email
$event->addGuestEmail('guest@domain.com');
// or 
$event->addGuestEmail('guest@localhost');

// The documentation says this is to identify the event source.
// It seems to make no difference.
$event->setPropertyName('My Society');

// The documentation says this is to identify the website source.
// It seems to make no difference.
$event->setPropertyWebsite('https://www.mywebsite.com');

// Get Url for add Event
$event->getUrl();

统计信息

  • 总下载量: 808
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固