Differences
This shows you the differences between the selected revision and the current version of the page.
punbb20:oo 2009/01/26 10:20 | punbb20:oo 2020/02/06 11:04 current | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Sugestion on class structure for PunBB2.0 ====== | + | NOTE: This is a proposal from cereal, trhis is not punbb official |
- | ===== Graphical representation ===== | + | ====== Suggestion on class structure for PunBB2.0 ====== |
+ | example can be found here http://cereal.box.sk/punbbclass/ | ||
===== Explanation ===== | ===== Explanation ===== | ||
Line 19: | Line 20: | ||
==== PunBB ==== | ==== PunBB ==== | ||
+ | This class will hold all global vars needed for punbb to be run | ||
+ | it will also keep references to the db builder object, the user array (will later be an object) | ||
+ | and other stuff thats currently defined as globals ... | ||
==== PunBB-Category ==== | ==== PunBB-Category ==== | ||
- | === Read / Normal === | + | * construct(id): the id of the category, must be bigger then 0 |
- | class: PunBB-Category | + | |
- | * __construct(id): the id of the category, must be bigger then 0 | + | |
* getId | * getId | ||
* getName | * getName | ||
* getPosition | * getPosition | ||
- | * getForums( outputmethode ): this wil eitehr be an array of ids or an array of forum objects | + | * getForums( outputmethode ): this wil either be an array of ids or an array of forum objects |
- | === Write === | + | |
- | class: PunBB-Category-write | + | ==== PunBB-Category-write ==== |
- | * __construct(id) | + | * construct(id): id can be 0 (add a new category) or > 0 (edit a category) |
* setName( val ) | * setName( val ) | ||
* setPosition( val ) | * setPosition( val ) | ||
- | * addForum (id): add a forum to this category | ||
* delete: only allow this if the id is not 0 and no forums are added to this category, or add a force option to recursively delete all forums | * delete: only allow this if the id is not 0 and no forums are added to this category, or add a force option to recursively delete all forums | ||
+ | |||
+ | ==== PunBB-Forum ==== | ||
+ | * construct(id): the forum id, must be bigger then 0 | ||
+ | * getName | ||
+ | * getDesc | ||
+ | * getRedirect | ||
+ | * getModerators | ||
+ | * getStats | ||
+ | * getCategory(outputmethode): get it as an id, or as an object | ||
+ | |||
+ | ==== PunBB-Forum-write ==== | ||
+ | * construct(id): id can be 0 (add a new forum) or > 0 (edit a forum) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||