Go to the source code of this file.
Enumerations | |
| enum | SECOND |
| enum | MINUTE |
| enum | HOUR |
| enum | DAY |
| enum | WEEK |
| enum | MONTH |
| enum | YEAR |
| enum | KATA_DEBUG |
| enum | KATA_ERROR |
| enum | KATA_PANIC |
Functions | |
| kataAutoloader ($cname) | |
| debug ($var=false, $escape=false) | |
| if(!function_exists('kataDebugOutput')) | kataGetLineInfo () |
| kataGetValueInfo ($val) | |
| stripslashes_deep ($value) | |
| kataMakeTmpPath ($dirname) | |
| urldecode_deep ($value) | |
| writeLog ($what, $where=KATA_DEBUG) | |
| loadModel ($name) | |
| getModel ($name) | |
| getUtil ($name) | |
| env ($key) | |
| am () | |
| kataUse () | |
| vendor ($name) | |
| h ($text) | |
| is (&$arg, $default=null) | |
| enum DAY |
Definition at line 22 of file basics.php.
| enum HOUR |
Definition at line 21 of file basics.php.
| enum KATA_DEBUG |
our error-level constants
Definition at line 30 of file basics.php.
| enum KATA_ERROR |
Definition at line 31 of file basics.php.
| enum KATA_PANIC |
Definition at line 32 of file basics.php.
| enum MINUTE |
Definition at line 20 of file basics.php.
| enum MONTH |
Definition at line 24 of file basics.php.
| enum SECOND |
some often used constants that should be part of PHP
Definition at line 19 of file basics.php.
| enum WEEK |
Definition at line 23 of file basics.php.
| enum YEAR |
Definition at line 25 of file basics.php.
| am | ( | ) |
merge any number of arrays
| array | first array | |
| array | second array and so on |
Definition at line 354 of file basics.php.
Referenced by Helper::parseAttributes().

| debug | ( | $ | var = false, |
|
| $ | escape = false | |||
| ) |
print out type and content of the given variable if DEBUG-define (in config/core.php) > 0
| mixed | $var Variable to debug | |
| boolean | $escape If set to true variables content will be html-escaped |
| mixed | $var variable to dump | |
| bool | $isTable if variable is an array we use a table to display each line |
Definition at line 113 of file basics.php.
| env | ( | $ | key | ) |
Gets an environment variable from available sources. Used as a backup if $_SERVER/$_ENV are disabled.
| string | $key Environment variable name. |
Definition at line 316 of file basics.php.
Referenced by IpUtility::getIp(), IpUtility::isUsingProxy(), and SessionComponent::startup().

| getModel | ( | $ | name | ) |
return a handle to the given model. loads and initializes the model if needed.
| string | $value model name (without .php) |
Definition at line 287 of file basics.php.
References classRegistry::getObject(), and loadModel().

| getUtil | ( | $ | name | ) |
return class-handle of a utility-class
| string | $name name of the utility |
Definition at line 301 of file basics.php.
References classRegistry::getObject().
Referenced by Model::cachedQuery(), Model::describe(), SessionComponent::getIp(), and ClusterlockUtility::initialize().


| h | ( | $ | text | ) |
Convenience method for htmlspecialchars. you should use this instead of echo to avoid xss-exploits
| string | $text |
Definition at line 396 of file basics.php.
Referenced by HtmlHelper::selectTag().

| is | ( | &$ | arg, | |
| $ | default = null | |||
| ) |
convenience method to check if given value is set. if so, value is return, otherwise the default
| mixed | $arg value to check | |
| mixed | $default value returned if $value is unset |
Definition at line 408 of file basics.php.
Referenced by HttpUtility::getReturnHeaders(), and HtmlHelper::tokenUrl().

| kataAutoloader | ( | $ | cname | ) |
include the baseclass of whatever a model or controller is derived from. this happens only once per request, so the penalty of using __autoload is small.
| string | $cname classname |
Definition at line 42 of file basics.php.
References kataUse().

| if (!function_exists('kataDebugOutput')) kataGetLineInfo | ( | ) |
internal function to send kata debug info to the browser. just define your own function if you want firebug or something like it return the shortend path of the file currently begin executed
Definition at line 156 of file basics.php.
Referenced by CacheUtility::add(), CacheUtility::read(), and CacheUtility::write().

| kataGetValueInfo | ( | $ | val | ) |
return stacktrace-like information about the given variable
Definition at line 179 of file basics.php.
Referenced by CacheUtility::add(), CacheUtility::read(), and CacheUtility::write().

| kataMakeTmpPath | ( | $ | dirname | ) |
create a directory in TMPPATH and check if its writable
Definition at line 220 of file basics.php.
Referenced by SessionComponent::__construct(), CacheUtility::initialize(), LockUtility::lock(), and writeLog().

| kataUse | ( | ) |
load files from the from LIB-directory
| string | filename without .php |
Definition at line 371 of file basics.php.
References $args.
Referenced by Controller::_constructClasses(), View::constructHelpers(), dispatcher::dispatch(), Controller::initViewClass(), kataAutoloader(), and Model::setupDbo().

| loadModel | ( | $ | name | ) |
include all neccessary classes and the given model
| string | model name without .php - if null it just loads all needed classes |
Definition at line 274 of file basics.php.
Referenced by Controller::_constructClasses(), and getModel().

| stripslashes_deep | ( | $ | value | ) |
Recursively strips slashes from all values in an array
| mixed | $value |
Definition at line 209 of file basics.php.
| urldecode_deep | ( | $ | value | ) |
Recursively urldecodes all values in an array
| mixed | $value |
Definition at line 236 of file basics.php.
| vendor | ( | $ | name | ) |
loads the given files in the VENDORS directory if not already loaded
| string | $name Filename without the .php part. |
Definition at line 382 of file basics.php.
References $args.
| writeLog | ( | $ | what, | |
| $ | where = KATA_DEBUG | |||
| ) |
write a string to the log in KATATMP/logs
| string | $what string to write to the log | |
| int | $where log-level to log (default: KATA_DEBUG) |
Definition at line 248 of file basics.php.
References kataMakeTmpPath().
Referenced by Model::log(), and Controller::log().


1.5.8