src/ICal/Event.php
public function printData($html = self::HTML_TEMPLATE)
    {
        $data = array(
            'SUMMARY'       => $this->summary,
            'DTSTART'       => $this->dtstart,
            'DTEND'         => $this->dtend,
            'DTSTART_TZ'    => $this->dtstart_tz,
            'DTEND_TZ'      => $this->dtend_tz,
            'DURATION'      => $this->duration,
            'DTSTAMP'       => $this->dtstamp,
            'UID'           => $this->uid,
            'CREATED'       => $this->created,
            'LAST-MODIFIED' => $this->lastmodified,
            'DESCRIPTION'   => $this->description,
            'LOCATION'      => $this->location,
            'SEQUENCE'      => $this->sequence,
            'STATUS'        => $this->status,
            'TRANSP'        => $this->transp,
            'ORGANISER'     => $this->organizer,
            'ATTENDEE(S)'   => $this->attendee,
        );

        $data   = array_filter($data); // Remove any blank values
        $output = '';

        foreach ($data as $key => $value) {
            $output .= sprintf($html, $key, $value);
        }

        return $output;
    }
public function printData($html = self::HTML_TEMPLATE)
    {
        $data = array(
            'SUMMARY'       => $this->summary,
            'DTSTART'       => $this->dtstart,
            'DTEND'         => $this->dtend,
            'DTSTART_TZ'    => $this->dtstart_tz,
            'DTEND_TZ'      => $this->dtend_tz,
            'DURATION'      => $this->duration,
            'DTSTAMP'       => $this->dtstamp,
            'UID'           => $this->uid,
            'CREATED'       => $this->created,
            'LAST-MODIFIED' => $this->lastmodified,
            'DESCRIPTION'   => $this->description,
            'LOCATION'      => $this->location,
            'SEQUENCE'      => $this->sequence,
            'STATUS'        => $this->status,
            'TRANSP'        => $this->transp,
            'ORGANISER'     => $this->organizer,
            'ATTENDEE(S)'   => $this->attendee,
        );

        $data   = array_filter($data); // Remove any blank values
        $output = '';

        foreach ($data as $key => $value) {
            $output .= sprintf($html, $key, $value);
        }

        return $output;
    }
public function printData ( $ html = self :: HTML_TEMPLATE ) { $ data = array ( 'SUMMARY' => $ this -> summary , 'DTSTART' => $ this -> dtstart , 'DTEND' => $ this -> dtend , 'DTSTART_TZ' => $ this -> dtstart_tz , 'DTEND_TZ' => $ this -> dtend_tz , 'DURATION' => $ this -> duration , 'DTSTAMP' => $ this -> dtstamp , 'UID' => $ this -> uid , 'CREATED' => $ this -> created , 'LAST-MODIFIED' => $ this -> lastmodified , 'DESCRIPTION' => $ this -> description , 'LOCATION' => $ this -> location , 'SEQUENCE' => $ this -> sequence , 'STATUS' => $ this -> status , 'TRANSP' => $ this -> transp , 'ORGANISER' => $ this -> organizer , 'ATTENDEE(S)' => $ this -> attendee , ) ; $ data = array_filter ( $ data ) ; // Remove any blank values $ output = '' ; foreach ( $ data as $ key => $ value ) { $ output .= sprintf ( $ html , $ key , $ value ) ; } return $ output ; }
Returns Event data excluding anything blank
within an HTML template

@param  string $html HTML template to use
@return string
Returns Event data excluding anything blank within an HTML template