1: <?php
2: /**
3: * @file
4: * @package legacy
5: * @version $Id$
6: **/
7:
8: if(!defined('XOOPS_ROOT_PATH'))
9: {
10: exit();
11: }
12:
13: /**
14: * Interface of category delegate
15: **/
16: interface Legacy_iCategoryDelegate
17: {
18: /**
19: * getTitle Legacy_Category.{dirname}.GetTitle
20: *
21: * @param string &$title category title
22: * @param string $catDir category module's directory name
23: * @param int $catId category id
24: *
25: * @return void
26: */
27: public static function getTitle(/*** string ***/ &$title, /*** string ***/ $catDir, /*** int ***/ $catId);
28:
29: /**
30: * getTree Legacy_Category.{dirname}.GetTree
31: * Get category Legacy_AbstractCategoryObject array in parent-child tree order
32: *
33: * @param Legacy_AbstractCategoryObject[] $tree
34: * @param string $catDir category module's dirname
35: * @param string $authType ex) viewer, editor, manager
36: * @param int $catId get tree under this cat_id
37: * @param string $module module confinement
38: *
39: * @return void
40: */
41: public static function getTree(/*** Legacy_AbstractCategoryObject[] ***/ &$tree, /*** string ***/ $catDir, /*** string ***/ $authType, /*** int ***/ $catId=0, /*** string ***/ $module=null);
42:
43: /**
44: * getTitleList Legacy_Category.{dirname}.GetTitleList
45: *
46: * @param string &$titleList category title array
47: * @param string $catDir category module's dirname
48: *
49: * @return void
50: */
51: public static function getTitleList(/*** string[] ***/ &$titleList, /*** string ***/ $catDir);
52:
53: /**
54: * hasPermission Legacy_Category.{dirname}.HasPermission
55: *
56: * @param bool &$check
57: * @param string $catDir category module's dirname
58: * @param int $catId category id
59: * @param string $authType ex) viewer, editor, manager
60: * @param string $module module confinement
61: *
62: * @return void
63: */
64: public static function hasPermission(/*** bool ***/ &$check, /*** string ***/ $catDir, /*** int ***/ $catId, /*** string ***/ $authType, /*** string ***/ $module=null);
65:
66: /**
67: * getParent Legacy_Category.{dirname}.GetParent
68: * get the parent category object.
69: *
70: * @param Legacy_AbstractCategoryObject &$parent
71: * @param string $catDir category module's dirname
72: * @param int $catId category id
73: *
74: * @return void
75: */
76: public static function getParent(/*** Legacy_AbstractCategoryObject ***/ &$parent, /*** string ***/ $catDir, /*** int ***/ $catId);
77:
78: /**
79: * getChildren Legacy_Category.{dirname}.GetChildren
80: * get the child category objects. Be careful that you can get only children objects, excluded the given category itself.
81: *
82: * @param Legacy_AbstractCategoryObject[] &$children
83: * @param string $catDir category module's dirname
84: * @param int $catId the parent's category id
85: * @param string $authType ex) viewer, editor, manager
86: * @param string $module module confinement
87: *
88: * @return void
89: */
90: public static function getChildren(/*** Legacy_AbstractCategoryObject[] ***/ &$children, /*** string ***/ $catDir, /*** int ***/ $catId, /*** string ***/ $authType, /*** string ***/ $module=null);
91:
92: /**
93: * getCatPath Legacy_Category.{dirname}.GetCatPath
94: * get category path array from top to the given category.
95: *
96: * @param string[] &$catPath
97: * $catPath['cat_id']
98: * $catPath['title']
99: * @param string $catDir category module's dirname
100: * @param int $catId terminal category id in the category path
101: * @param string $order 'ASC' or 'DESC'
102: *
103: * @return void
104: */
105: public static function getCatPath(/*** array ***/ &$catPath, /*** string ***/ $catDir, /*** int ***/ $catId, /*** string ***/ $order='ASC');
106:
107: /**
108: * getPermittedIdList Legacy_Category.{dirname}.GetPermittedIdList
109: * get category ids of permission.
110: *
111: * @param int[] &$idList
112: * @param string $catDir category module's dirname
113: * @param string $authType ex) viewer, editor, manager
114: * @param int $uid
115: * @param int $catId get result under this cat_id
116: * @param string $module module confinement
117: *
118: * @return void
119: */
120: public static function getPermittedIdList(/*** int[] ***/ &$idList, /*** string ***/ $catDir, /*** string ***/ $authType, /*** int ***/ $uid, /*** int ***/ $catId=0, /*** string ***/ $module=null);
121:
122: }
123:
124: ?>
125: