Skip to content

Commit

Permalink
#98 Simplify extending of Ics Generator to adopt it for emails
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev committed Sep 1, 2020
1 parent d5f00a6 commit c705b17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Generators/Ics.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,13 @@ public function generate(Link $link): string

$url[] = 'END:VEVENT';
$url[] = 'END:VCALENDAR';
$redirectLink = implode("\r\n", $url);

return 'data:text/calendar;charset=utf8;base64,'.base64_encode($redirectLink);
return $this->buildLink($url);
}

protected function buildLink(array $propertiesAndComponents): string
{
return 'data:text/calendar;charset=utf8;base64,'.base64_encode(implode("\r\n", $propertiesAndComponents));
}

/** @see https://tools.ietf.org/html/rfc5545.html#section-3.3.11 */
Expand Down

0 comments on commit c705b17

Please sign in to comment.