Exemplo n.º 1
0
 /**
  *  Constructor.
  *
  * @param NeedsLoader $loader The object that loaded the data.
  */
 public function __construct($loader)
 {
     parent::__construct();
     $this->json_data = $loader->load_feed();
 }
Exemplo n.º 2
0
 /**
  * Shows all the needs 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 needs posted on the Plaza.
  */
 public function needs($num_per_page = 10)
 {
     if ($this->needs_num_requested == $num_per_page && !is_null($this->needs)) {
         return $this->needs;
     }
     $this->needs_num_requested = $num_per_page;
     $loader = new NeedsLoader($this->subdomain, $num_per_page, $this->cacher, $this->group_nickname);
     $loader->add_url_params($this->other_url_params);
     $this->needs = new Needs($loader);
     return $this->needs;
 }