<?php

class shortcode_rhc_timetable {
	function __construct(){
		
		//wrapper shortcode for calendarizeit 
		add_shortcode( 'rhc_timetable', array(&$this,'handle_shortcode'));
	}
	
	function handle_shortcode( $atts, $content=null, $code="" ){
		//return 'TODO';
		$defaults = array(
			'defaultview'			=> "agendaWeek",
			'firsthour'				=> '6',
			'header_left'			=> 'rhc_search prev,next',
			'header_center'			=> '',
			'header_right'			=> 'title',
			'class'					=> 'rhc-timetable'
		);
		
		extract(shortcode_atts($defaults, $atts));
		
		foreach( $defaults as $field => $value ){
			$atts[$field] = $$field;
		}
		
		return do_shortcode(generate_calendarize_shortcode($atts));
	}
}
