Quick Search:

View

Revision:

Diff

Diff from 368 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/osCommerce/trunk/oscommerce/includes/classes/category.php

Annotated File View

hpdl
208
1 <?php
2 /*
3   $Id: account.php 207 2005-09-26 01:29:31 +0200 (Mo, 26 Sep 2005) hpdl $
4
5   osCommerce, Open Source E-Commerce Solutions
6   http://www.oscommerce.com
7
8   Copyright (c) 2005 osCommerce
9
10   Released under the GNU General Public License
11 */
12
13   class osC_Category {
14     var $_data = array();
15
16     function osC_Category($id) {
hpdl
299
17       global $osC_CategoryTree;
hpdl
208
18
hpdl
299
19       if ($osC_CategoryTree->exists($id)) {
20         $this->_data = $osC_CategoryTree->getData($id);
hpdl
208
21       }
22     }
23
hpdl
298
24     function getID() {
25       return $this->_data['id'];
26     }
hpdl
208
27
hpdl
298
28     function getTitle() {
29       return $this->_data['name'];
hpdl
208
30     }
31
32     function getImage() {
hpdl
298
33       return $this->_data['image'];
hpdl
208
34     }
hpdl
299
35
36     function hasParent() {
37       if ($this->_data['parent_id'] > 0) {
38         return true;
39       }
40
41       return false;
42     }
43
44     function getParent() {
45       return $this->_data['parent_id'];
46     }
47
48     function getPath() {
49       global $osC_CategoryTree;
50
51       return $osC_CategoryTree->buildBreadcrumb($this->_data['id']);
52     }
hpdl
208
53   }
54 ?>