![]() |
Tina4Stack
v1.0.1
The Tina4 Stack
|
Public Member Functions | |
__construct () | |
getDefaultPage ($pageName) | |
createDatabase () | |
getCallParams ($input) | |
parseValue ($search, $value, $template) | |
getTemplate ($template, $data="") | |
parseTemplate ($template, $data="", $nullVars=true) | |
getPageTemplate ($title="Default") | |
getSubMenus ($menuId=0, $systemMenu=1) | |
getMenuList ($parentId=0, $systemMenu=1) | |
getMenu ($parentId=0, $systemMenu=1) | |
getInsertMenuItemForm () | |
insertMenuItem () | |
deleteMenuItem () | |
updateMenuItem () | |
getMenuItemForm ($menuId) | |
getMenuTree ($filter="where parent_id = 0 and menu_id <> 0", $menuId=0) | |
getUserList ($filter="") | |
getMenuCreator () | |
getUsers () | |
getUserTypes () | |
getRouteTarget ($recordValue=null, $fieldName) | |
getRoutes () | |
cacheRoutes () | |
loadDefines () | |
loadRoutes () | |
getGlobalSettings () | |
getFlushXCache () | |
getLogin () | |
authenticate () | |
getUserRecord ($userId=0) | |
getProfileUpdate () | |
updatePOST () | |
matchConditions ($string) | |
sortConditions ($originalString, $matches) | |
matchSwitchConditions ($string) | |
sortSwitchConditions ($originalString, $matches) | |
getEditor ($recordValue=null, $fieldName) | |
getContent ($contentId="0") | |
getContentEditor () | |
display () | |
Public Attributes | |
$createDB | |
$KIM | |
$defaultPages = ["index.html", "index.php", "home.html"] | |
$defaultExtensions = [".html", ".php"] | |
$varRegex = '/{([a-zA-Z0-9\_\->\[\]\"\|\'\(\)\$]+)}/i' | |
Kim is a class to handle the menu driven roles and routes for Tina4 http://localhost:12345/dokuwiki/kim
Kim::__construct | ( | ) |
Create a database connection for Kim to use.
Check if we need to be creating the database for the menus
Kim::authenticate | ( | ) |
Kim::cacheRoutes | ( | ) |
Kim::createDatabase | ( | ) |
Function to create the tables for Kim to be used with roles, routes, menus
Kim::deleteMenuItem | ( | ) |
Kim::display | ( | ) |
Determines whether to show login screen etc.
Kim::getCallParams | ( | $input | ) |
This is an string of variables in the form var1,var2 or enclosed in quotes "var1","var2"
type | $input |
Kim::getContent | ( | $contentId = "0" | ) |
Kim::getContentEditor | ( | ) |
This code returns a grid for editing WYSIWYG content.
Kim::getDefaultPage | ( | $pageName | ) |
Gets the default page to display where possible which will be found under assets
String | $pageName | The page to try and load or the path to load |
Kim::getEditor | ( | $recordValue = null , |
|
$fieldName | |||
) |
Kim::getFlushXCache | ( | ) |
The function which flushes the XCache
Kim::getGlobalSettings | ( | ) |
Kim::getInsertMenuItemForm | ( | ) |
Kim::getLogin | ( | ) |
Function for the login screen
Kim::getMenu | ( | $parentId = 0 , |
|
$systemMenu = 1 |
|||
) |
Kim::getMenuCreator | ( | ) |
Kim::getMenuItemForm | ( | $menuId | ) |
type | $menuId |
Kim::getMenuList | ( | $parentId = 0 , |
|
$systemMenu = 1 |
|||
) |
Kim::getMenuTree | ( | $filter = "where parent_id = 0 and menu_id <> 0" , |
|
$menuId = 0 |
|||
) |
Kim::getPageTemplate | ( | $title = "Default" | ) |
Return default bootstrap page
Kim::getProfileUpdate | ( | ) |
Kim::getRoutes | ( | ) |
Kim::getRouteTarget | ( | $recordValue = null , |
|
$fieldName | |||
) |
Kim::getSubMenus | ( | $menuId = 0 , |
|
$systemMenu = 1 |
|||
) |
Kim::getTemplate | ( | $template, | |
$data = "" |
|||
) |
The template parser of kim is quite important for rendering content, she takes a string of template and optionally record / object / array of data to use for parsing. A template may contain PHP code for whatever reason.
//default language is as follows
{variable}
Use of this is for when you have a variable in PHP and you want to display it. This will check defines etc
{OBJECT}
This is normally provided from the DATA parameter and will be parsed first.
{{Kim:phpinfo?1}} //call the Kim object phpinfo method, with first variable = 1
{{call:substr?test,1,2}} //call substr with variable params, this should return "es"
{{call:substr?"I am first, user's pet",1,2}} //call substr with params which have commas in
{{include:/path/to/file}} //This will include a kim file and parse it
type | $template | a string template of content |
type | $data | - an array or object to itterate through with data for parsing |
Kim::getUserList | ( | $filter = "" | ) |
Kim::getUserRecord | ( | $userId = 0 | ) |
Kim::getUsers | ( | ) |
Kim::getUserTypes | ( | ) |
Kim::insertMenuItem | ( | ) |
Kim::loadDefines | ( | ) |
Kim::loadRoutes | ( | ) |
Kim::matchConditions | ( | $string | ) |
type | $string |
Kim::matchSwitchConditions | ( | $string | ) |
Match switch conditions
type | $string |
Kim::parseTemplate | ( | $template, | |
$data = "" , |
|||
$nullVars = true |
|||
) |
This section here needs to be updated if there are strange characters that get passed into the system via snippet calls in the templae
Kim::parseValue | ( | $search, | |
$value, | |||
$template | |||
) |
Kim::sortConditions | ( | $originalString, | |
$matches | |||
) |
type | $originalString | |
type | $matches |
Kim::sortSwitchConditions | ( | $originalString, | |
$matches | |||
) |
Sort Switch cases and convert to If-Else Statement
type | $originalString | |
type | $matches |
Kim::updateMenuItem | ( | ) |
Kim::updatePOST | ( | ) |
Kim::$createDB |
Kim::$defaultExtensions = [".html", ".php"] |
Kim::$defaultPages = ["index.html", "index.php", "home.html"] |
Kim::$KIM |
Kim::$varRegex = '/{([a-zA-Z0-9\_\->\[\]\"\|\'\(\)\$]+)}/i' |