/** * Constructor. * * @param PrayersLoader $loader The object that loaded the data. */ public function __construct($loader) { parent::__construct(); $this->json_data = $loader->load_feed(); }
/** * Shows all the prayers 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 prayers posted on the Plaza. */ public function prayers($num_per_page = 10) { if ($this->prayers_num_requested == $num_per_page && !is_null($this->prayers)) { return $this->prayers; } $this->prayers_num_requested = $num_per_page; $loader = new PrayersLoader($this->subdomain, $num_per_page, $this->cacher, $this->group_nickname); $loader->add_url_params($this->other_url_params); $this->prayers = new Prayers($loader); return $this->prayers; }