Documentation is available at eventlist.php
- <?php
- class net_nemein_registrations_eventlist {
- // Configuration
- var $_topic;
- var $_config;
- var $_auth;
- var $_root_event;
- function net_nemein_registrations_eventlist ($topic, $config, $auth, $rootevent) {
- $this->_topic = $topic;
- $this->_config = $config;
- $this->_auth = $auth;
- $this->_root_event = $rootevent;
- }
- function query ($only_open = false) {
- debug_push("registrations::eventlist query");
- debug_add("Will query " . (is_null($this->_config->get("event_type")) ? "all types"
- : "type " . $this->_config->get("event_type")));
- if (is_null($this->_config->get("event_type")))
- $result = mgd_list_events ($this->_root_event->id, "start");
- else
- $result = mgd_list_events ($this->_root_event->id, "start", $this->_config->get("event_type"));
- if (! $result) {
- debug_add("Did not found any events. mgd_errstr was " . mgd_errstr());
- debug_pop();
- return Array();
- }
- $res = Array();
- while ($result->fetch()) {
- $regevent = $this->get_regevent(mgd_get_event($result->id));
- if ($only_open == false || $regevent->is_open())
- $res[$result->id] = $regevent->event;
- }
- debug_pop();
- return $res;
- }
- function get_regevent ($event) {
- return new net_nemein_registrations_regevent($event, $this->_topic, $this->_config,
- $this->_auth, $this->_root_event);
- }
- }
- ?>
Documentation generated on Mon, 21 Nov 2005 18:15:06 +0100 by phpDocumentor 1.3.0RC3