Annotation of db/prgsrc/drupal/modules/chgk_db/classes/DbPackage/DbPackageChamp.class.php, revision 1.2

1.1       roma7       1: <?php
                      2: 
                      3: class DbPackageChamp extends DbPackage {
1.2     ! roma7       4:   private $tours;
        !             5:   
1.1       roma7       6:   protected function setId() {
                      7:     $this->id = str_replace('.txt', '', $this->tour->FileName);
                      8:   }
1.2     ! roma7       9:   
        !            10:   public function getAll() {
        !            11:     $this->loadTours();
        !            12:   }
        !            13:   
        !            14:   private function loadTours() {
        !            15:     $res = $this->db->getToursRes($this->getDbId());
        !            16:     while ($row = $this->db->fetch_row($res)) {
        !            17:       $this->tours[$row->Number] = new DbPackageTour($row, $this);
        !            18:       $this->tours[$row->Number] -> loadQuestions();
        !            19:     }      
        !            20:   }
        !            21:   public function getPrintVersion() {
        !            22:       $this->loadTours();
        !            23:       $content = theme('chgk_db_champ_full', $this);
        !            24:      return theme('chgk_db_print', $this->getTitle(), $content);
        !            25:   }
        !            26:   
        !            27:   public function getTours() {
        !            28:       return $this->tours;
        !            29:   }
        !            30:   public function isSingleTour() {
        !            31:       return sizeof($this->tours)==1;
        !            32:   }
1.1       roma7      33: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>