public function getOutput() {
    	$this->lines = array();
    
		$this->addLine('BEGIN:VCALENDAR');
		$this->addLine('VERSION:2.0');
    	
		if( is_null($this->prodid) ) {
			$this->addLine("PRODID:" . '-//'.$this->host.'//NONSGML v1.0//EN');
		} 
		elseif( !is_null($this->prodid) ) {
			$this->addLine("PRODID:" . $this->prodid);
		}
		
    	$upcomingEvents = $this->calendar->UpcomingEvents($this->limit); /* @var $upcomingEvents DataObjectSet */
    	foreach($upcomingEvents as $dateTime) { /* @var $event CalendarDateTime */
    		$this->addDateTime($dateTime);
    	}
    	
		$this->addLine('END:VCALENDAR');
		
		return implode("\r\n", $this->lines);
    }