diff --git a/src/Calendar.php b/src/Calendar.php index a37d585..881f3b3 100644 --- a/src/Calendar.php +++ b/src/Calendar.php @@ -274,9 +274,19 @@ public function stylesheet(bool $print = true): ?string * * @param array{color?: string, startDate?: (string|DateTimeInterface), timeInterval?: int, endTime?: string, startTime?: string} $options */ - public function render(array $options): void + public function display(array $options): void { echo $this->stylesheet(); + echo $this->render($options); + } + + /** + * New Render method that uses options. + * + * @param array{color?: string, startDate?: (string|DateTimeInterface), timeInterval?: int, endTime?: string, startTime?: string} $options + */ + public function render(array $options): void + { echo 'week' === $this->config->type ? $this->asWeekView($options) : $this->asMonthView($options); } }