1. Go to this page and download the library: Download beastbytes/icalendar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use BeastBytes\ICalendar\Component;
class NonStandardComponent extends Component
{
public const NAME = 'NON-STANDARD-COMPONENT';
protected const CARDINALITY = [
// declare cardinality of the component's properties here
];
}
---
Vcalendar::registerNonStandardComponent(NonStandardComponent::NAME);
$nonStandardComponent = new NonStandardComponent();
$vCalendar = (new Vcalendar())->addComponent($nonStandardComponent);
// $vCalendar->hasComponent(NonStandardComponent::NAME) === true;
public const NON_STANDARD_PROPERTY = 'NON-STANDARD-PROPERTY';
Vevent::registerNonStandardProperty(self::NON_STANDARD_PROPERTY, Vevent::CARDINALITY_ONE_MAY);
$vEvent = (new Vevent())->addProperty(self::NON_STANDARD_PROPERTY, $value);
// $vEvent->hasProperty(self::NON_STANDARD_PROPERTY) === true;