<?php
namespace App\Utils\Calendar;

/**
 * General class for calendar
 * @author Oana Stan
 */
class Calendar
{
	/**
	 * Stores a list with all events that will be included in calendar
	 * @var array
	 */
	protected $eventsList = [];

	/**
	 * Add event to calendar
	 * @param \App\Utils\Calendar\Event $event
	 * @return \App\Utils\Calendar\Calendar
	 */
	public function addEvent(\App\Utils\Calendar\Event $event)
	{
		$this->eventsList[] = $event;
		return $this;
	}

	/**
	 * Returns list with events
	 * @return Array
	 */
	public function getEventsList()
	{
		return $this->eventsList;
	}

	/**
	 * Return number of events
	 * @return number
	 */
	public function getNumberOfEvents()
	{
		return count($this->eventsList);
	}
}