/** * Shows all the events posted on the Plaza. * * @param integer $num_per_page The number of items to show. Max is 15. Default is 10. * * @return array of all the events posted on the Plaza. */ public function events($num_per_page = 10) { if ($this->events_num_requested == $num_per_page && !is_null($this->events)) { return $this->events; } $this->events_num_requested = $num_per_page; $loader = new EventsLoader($this->subdomain, $num_per_page, $this->cacher, $this->group_nickname); $loader->add_url_params($this->other_url_params); $this->events = new Events($loader); return $this->events; }
/** * Constructor. * * @param EventsLoader $loader The object that loaded the data. */ public function __construct($loader) { parent::__construct(); $this->json_data = $loader->load_feed(); }