public function createCalendar($type)
	{
		if (!isset($this->calendarTypes[$type])) {
			throw new \OutOfBoundsException("A calendar type called {$type} does not exist within the factory.");
		}

		$calendar = new $this->calendarTypes[$type]();

		return $calendar;
	}
public function createCalendar($type)
	{
		if (!isset($this->calendarTypes[$type])) {
			throw new \OutOfBoundsException("A calendar type called {$type} does not exist within the factory.");
		}

		$calendar = new $this->calendarTypes[$type]();

		return $calendar;
	}
public function createCalendar ( $ type ) { if ( ! isset ( $ this -> calendarTypes [ $ type ] ) ) { throw new \ OutOfBoundsException ( "A calendar type called {$type} does not exist within the factory." ) ; } $ calendar = new $ this -> calendarTypes [ $ type ] ( ) ; return $ calendar ; }
Creates and returns an instance of a stored calendar type.

@param  string				$type
@return CalendarInterface
@throws OutOfBoundsException
Creates and returns an instance of a stored calendar type .