nowcal
v1.6.0
IcalEndar V2.0イベントを生成するための最新のPHPライブラリ。
Composerを使用してcomposer require itsnubix/nowcal
use NowCal NowCal ;
$ event = NowCal:: create ([ ' start ' => ' October 5, 2019 6:03PM ' ]))
-> summary ( ' Daft Punk is playing ' )
-> location ( ' My House ' );次のプロパティは、NowCalインスタンスで取得/設定できます。ユーザーは、クラスのセットプロパティヘルパー、つまり$nowcal->location('Event Location');彼らは複数の呼び出しを一緒に文字列で描き、必要に応じてコールバックをサポートするための素晴らしい構文を提供します。
| 財産 | 説明 |
|---|---|
| uid | グローバルに一意のID。注:同じUIを使用して同じICSファイルをカレンダーアプリに渡すことで、既存の招待状を更新できます |
| 始める | DateTimeで壊可能な文字列 |
| タイムゾーン | DateTimezoneが解析可能な文字列 |
| 終わり | RFC 5545によると、DateTimeが解放可能な文字列は、最終値または期間値のみを使用できます |
| 間隔 | RFC 5545によると、dateintervalが解析可能な文字列は、最終値または持続時間値のみを使用できます |
| まとめ | イベントの簡単な説明 |
| 位置 | イベントが開催される場所 |
| 順序 | バージョン番号を表す整数 |
| 方法 | 必要に応じて、公開/キャンセル/などを送信します |
| リマインダー | シンプルなディスプレイリマインダー。 DateIntervalが解析可能な文字列。 |
$ props = [
' start ' => ' now ' ,
' end ' => ' now + 1 hour ' ,
// OR
' duration ' => ' 28d 6h 42m 12s ' ,
' summary ' => ' Daft Punk is playing ' ,
' location ' => ' My House ' ,
];
// Creates a NowCal instance
$ nowcal = new NowCal ( $ props ); // or NowCal::create($props);
// Exports a raw output array
$ nowcal -> raw ; // or NowCal::raw($props)
// Exports a plain text version
$ nowcal -> plain ; // or NowCal::plain($props)
// Exports a path to a tempfile
$ nowcal -> file ; // or NowCal::file($props)