AE_decode [line 812]
void AE_decode(
array &$dest, string $var
)
|
|
Weird function. $dest is an associative array, that may contain stuff like $dest["a_AE_c_AE_b"] = 3.
Now if you run this function like this: AE_decode($dest, "a_AE_c_AE_b"); then $dest will contain a decoded array: echo $dest["a"]["b"]["c"]; <- this will display 3
Parameters:
|
array |
&$dest: |
the array to put the decoded var in |
|
string |
$var: |
the var to decode |
atkActionStatus [line 1418]
void atkActionStatus(
var $status
)
|
|
Returns a string representation of an action status.
Parameters:
|
var |
$status: |
status of the action (ACTION_FAILED|ACTION_SUCCESS|ACTION_CANCELLED) |
atkArrayCompare [line 1691]
boolean atkArrayCompare(
array $array1, array $array2
)
|
|
Compares two assosiative multi dimensonal array's
if arrays differ, return true, otherwise it returns false
Parameters:
|
array |
$array1: |
original array |
|
array |
$array2: |
new array |
API Tags:
| Return: | wether or not the arrays differ |
atkArrayDiff [line 1705]
mixed atkArrayDiff(
array $array1, array $array2
)
|
|
Compares two assosiative multi dimensonal array's
if arrays differ, return differences, otherwise it returns false
Parameters:
|
array |
$array1: |
original array |
|
array |
$array2: |
new array |
API Tags:
| Return: | differences or false if they do not differ |
atkArrayNvl [line 1932]
mixed atkArrayNvl(
array $array, string $key, [mixed $defaultvalue = null]
)
|
|
Looks up a value using the given key in the given array and returns the value if found or a default value if not found.
Parameters:
|
array |
$array: |
Array to be searched for key |
|
string |
$key: |
Key for which we are looking in array |
|
mixed |
$defaultvalue: |
Value we will return if key was not found in array |
API Tags:
| Return: | Value retrieved from array or default value if not found in array |
atkButton [line 1561]
void atkButton(
string $text, [string $url = ""], [var $sessionstatus = SESSION_DEFAULT], [ $embedded = true], [string $cssclass = ""], bool $embeded
)
|
|
Creates a session aware button
Parameters:
|
string |
$text: |
the text to display on the button |
|
string |
$url: |
the url to use for the button |
|
var |
$sessionstatus: |
the session flags (SESSION_DEFAULT (default)|SESSION_NEW|SESSION_REPLACE| SESSION_NESTED|SESSION_BACK) |
|
string |
$cssclass: |
the css class the button should get |
|
bool |
$embeded: |
wether or not it's an embedded button |
|
|
$embedded: |
|
atkCleanPath [line 1629]
cleaned-up atkCleanPath(
string $path
)
|
|
Clean-up the given path.
Parameters:
API Tags:
atkClone [line 1983]
object atkClone(
object $attribute
)
|
|
Function checks php version and clones the given attribute in the right way
Parameters:
|
object |
$attribute: |
The attribute to clone |
atkDataDecode [line 766]
void atkDataDecode(
array &$vars
)
|
|
Performs stripslashes on all vars and translates: something_AMDAE_other[] into something[][other] something_AE_other into something[other] (and a_AE_b_AE_c into a[b][c] and so on...
Parameters:
|
array |
&$vars: |
the array to be stripped and translated |
atkdebug [line 202]
void atkdebug(
String $txt, [Integer $flags = 0]
)
|
|
Function atkdebug
Adds debug text to the debug log
Parameters:
|
String |
$txt: |
The text that will be added to the log |
|
Integer |
$flags: |
An optional combination of DEBUG_ flags |
atkerror [line 280]
void atkerror(
string $txt
)
|
|
Like atkdebug, this displays a message at the bottom of the screen.
The difference is, that this is also displayed when debugging is turned off.
If errorreporting by email is turned on, the errormessages are also handled (from atkOutput)
Parameters:
|
string |
$txt: |
the text to display |
atkErrorHandler [line 60]
void atkErrorHandler(
$errtype: $errtype, $errstr: $errstr, $errfile: $errfile, $errline: $errline
)
|
|
Function atkErrorHandler This function catches PHP parse errors etc, and passes them to atkerror(), so errors can be mailed and output can be regulated.
This funtion must be registered with set_error_handler("atkErrorHandler");
Parameters:
|
$errtype: |
$errtype: |
One of the PHP errortypes (E_PARSE, E_USER_ERROR, etc) |
|
$errstr: |
$errstr: |
Error text |
|
$errfile: |
$errfile: |
The php file in which the error occured. |
|
$errline: |
$errline: |
The line in the file on which the error occured. |
atkexists [line 1313]
void atkexists(
string $type, string $name
)
|
|
Check if an atk class exists (attribute, relation or filter)
Parameters:
|
string |
$type: |
the type of the class (attribute|relation|filter) |
|
string |
$name: |
the name of the class |
atkFormatDate [line 2060]
string atkFormatDate(
$date $date, $format $format, [$weekday $weekday = false]
)
|
|
Format date according to a format string, uses ATK's language files to translate months, weekdays etc.
Parameters:
|
$date |
$date: |
timestamp or date array (gotten with getdate()) |
|
$format |
$format: |
format string, compatible with PHP's date format functions |
|
$weekday |
$weekday: |
always include day-of-week or not |
API Tags:
atkGetCharset [line 1918]
Return the default charset, first we look if the
config_default_charset is set, else we use the charset in the languge file;
atkGetClientIp [line 1958]
Returns the IP of the remote client.
API Tags:
atkGetDb [line 1011]
atkDb &atkGetDb(
[String $conn = 'default'], [ $reset = false], [ $mode = "r"]
)
|
|
Convenience wrapper for atkDb::getInstance()
Parameters:
|
String |
$conn: |
The name of the connection to retrieve |
|
|
$reset: |
|
|
|
$mode: |
|
API Tags:
| Return: | Database connection instance |
atkgetinclude [line 1298]
void atkgetinclude(
string $type, string $name
)
|
|
Returns the include file for an atk class (attribute, relation or filter)
Parameters:
|
string |
$type: |
the type of the class (attribute|relation|filter) |
|
string |
$name: |
the name of the class |
atkGetPostVar [line 1812]
void atkGetPostVar(
[ $key = ""]
)
|
|
Parameters:
atkGetTimingInfo [line 266]
atkGetTrace [line 297]
string atkGetTrace(
[string $format = "html"]
)
|
|
Returns a trace-route from all functions where-through the code has been executed
Parameters:
|
string |
$format: |
(html|plaintext) |
API Tags:
| Return: | Backtrace in html or plaintext format |
atkhalt [line 145]
bool atkhalt(
string $msg, [string $level = "warning"]
)
|
|
Function atkhalt Halts on critical errors and also on warnings if specified in the config file.
Parameters:
|
string |
$msg: |
The message to be displayed |
|
string |
$level: |
The level of the error, ("critical"|"warning" (default)) |
API Tags:
| Return: | false if something goes horribly wrong |
atkHost [line 1332]
Returns the (virtual) hostname of the server.
API Tags:
| Return: | the hostname of the server |
atkHref [line 534]
void atkHref(
$url, [ $name = ""], [ $sessionstatus = SESSION_DEFAULT], [ $saveform = false], [ $extraprops = ""]
)
|
|
Convenience wrapper for atkSessionManager::href().
Parameters:
|
|
$url: |
|
|
|
$name: |
|
|
|
$sessionstatus: |
|
|
|
$saveform: |
|
|
|
$extraprops: |
|
API Tags:
| See: | atkSessionManager::href |
atkimport [line 1597]
bool atkimport(
string $fullclassname, [bool $failsafe = true], [bool $path = false]
)
|
|
Imports a file
Parameters:
|
string |
$fullclassname: |
Name of class in atkformat (map1.map2.classfile) |
|
bool |
$failsafe: |
If $failsafe is true (default), the class is required. Otherwise, the class is included. |
|
bool |
$path: |
Whether or not it is NOT an ATK classname ("map.class"), if true it will interpret classname as: "map/class.classname.inc", default false. |
API Tags:
| Return: | whether the file we want to import was actually imported or not |
atkinstance [line 1679]
obj atkinstance(
string $fullclassname, [ $reset = false]
)
|
|
Return a singleton instance of the specified class.
This works for all singletons that implement the getInstance() method.
Parameters:
|
string |
$fullclassname: |
the ATK classname of the class ("map1.map2.classname") |
|
|
$reset: |
|
API Tags:
| Return: | instance of the class |
atknew [line 1663]
obj atknew(
string $fullclassname
)
|
|
Returns a new instance of a class
Parameters:
|
string |
$fullclassname: |
the ATK classname of the class ("map1.map2.classname") |
API Tags:
| Return: | instance of the class |
atknotice [line 247]
void atknotice(
String $txt
)
|
|
Send a notice to the debug log.
A notice doesn't get show unless your debug level is 3 or higher.
Parameters:
|
String |
$txt: |
The text that will be added to the log |
atkNvl [line 2028]
mixed atkNvl(
[mixed 0 = ... arguments]
)
|
|
Returns the first argument that is not null.
Parameters:
API Tags:
| Return: | first argument that is not null |
atkPopup [line 1029]
void atkPopup(
string $target, string $params, string $winName, int $width, int $height, [string $scroll = 'no'], [string $resize = 'no']
)
|
|
Returns a url to open a popup window
Parameters:
|
string |
$target: |
the target of the popup |
|
string |
$params: |
extra params to pass along |
|
string |
$winName: |
the name of the window |
|
int |
$width: |
the width of the popup |
|
int |
$height: |
the height of the popup |
|
string |
$scroll: |
allow scrolling? (no (default)|yes) |
|
string |
$resize: |
allow resizing? (no (default)|yes) return string the url for the popup window |
atkResolveClass [line 1947]
String atkResolveClass(
String $class
)
|
|
Resolve a classname to its final classname.
An application can overload a class with a custom version. This method resolves the initial classname to its overloaded version (if any).
Parameters:
|
String |
$class: |
The name of the class to resolve |
API Tags:
| Return: | The resolved classname |
atkSelf [line 1999]
Return the current script file. Like $_SERVER['PHP_SELF'], but sanitized for security reasons
atktext [line 483]
String atktext(
mixed $string, [String $module = ""], [String $node = ""], [String $lng = ""], [String $firstfallback = ""], [boolean $nodefaulttext = false], [boolean $modulefallback = false]
)
|
|
Replaces the [vars] with the values from the language files
Please note that it is important, for performance reasons, that you pass along the module where the language files can be found
Parameters:
|
mixed |
$string: |
string or array of strings containing the name(s) of the string to return when an array of strings is passed, the second will be the fallback if the first one isn't found, and so forth |
|
String |
$module: |
module in which the language file should be looked for, defaults to core module with fallback to ATK |
|
String |
$node: |
the node to which the string belongs |
|
String |
$lng: |
ISO 639-1 language code, defaults to config variable |
|
String |
$firstfallback: |
the first module to check as part of the fallback |
|
boolean |
$nodefaulttext: |
if true, then it doesn't return a default text when it can't find a translation |
|
boolean |
$modulefallback: |
Wether or not to use all the modules of the application in the fallback, when looking for strings |
API Tags:
| Return: | the string from the languagefile |
atkTrace [line 1521]
void atkTrace(
[string $msg = ""]
)
|
|
Writes trace file to system tmp directory
Parameters:
|
string |
$msg: |
message to display in the trace |
atkTriggerError [line 1059]
void atkTriggerError(
&$record, &$attrib, string $error, [string $message = ''], array $record, atkAttribute|array $attrib
)
|
|
Adds new element to the record error array. When no message is given the multi-language error string is used.
Parameters:
|
array |
$record: |
record |
|
atkAttribute|array |
$attrib: |
attribute or array of attributes |
|
string |
$error: |
multi-language error string |
|
string |
$message: |
error message (optional) |
|
|
&$record: |
|
|
|
&$attrib: |
|
atkurldecode [line 927]
void atkurldecode(
$string
)
|
|
Parameters:
atkurlencode [line 917]
string atkurlencode(
string $string, [bool $pref = true]
)
|
|
Safe urlencode function. Note, you can reencode already encoded strings, but
not more than 9 times! If you encode a string more than 9 times, you won't be able to decode it anymore
An atkurlencoded string is normaly prefixed with '__', so atkurldecode can determine whether the string was encoded or not. Sometimes however, if you need to reencode part of a string (used in recordlist), you don't want the prefix. Pass false as second parameter, and you won't get a prefix. (Note that you can't atkurldecode that string anymore, so only use this on substrings of already encoded strings)
Parameters:
|
string |
$string: |
the url to encode |
|
bool |
$pref: |
wether or not to use a prefix, default true |
API Tags:
Information Tags:
| Todo: | Fix a problem where a string containing "_9" will be altered after encoding + decoding it. |
atkuse [line 1323]
void atkuse(
string $type, string $name
)
|
|
Use an atk class (attribute, relation or filter)
Parameters:
|
string |
$type: |
the type of the class (attribute|relation|filter) |
|
string |
$name: |
the name of the class |
atkversion [line 1000]
Return the atk version number.
API Tags:
| Return: | the version number of ATK |
atkwarning [line 261]
unknown atkwarning(
unknown_type $txt
)
|
|
Send a warning to the debug log.
A warning gets shown more prominently than a normal debug line. However it does not trigger a mailreport or anything else that an atkerror triggers.
Parameters:
atkWriteLog [line 432]
void atkWriteLog(
String $text
)
|
|
Writes info to the optional debug logfile.
Please notice this feature will heavily decrease the performance and should therefore only be used for debugging and development purposes.
Parameters:
|
String |
$text: |
text to write to the logfile |
atkWriteToFile [line 415]
void atkWriteToFile(
String $text, [String $file = ""]
)
|
|
Writes info to a given file.
Useful for writing to any log files.
Parameters:
|
String |
$text: |
text to write to the logfile |
|
String |
$file: |
the file name |
atk_array_merge [line 548]
Array atk_array_merge(
Array $array1, Array $array2
)
|
|
Same as array_merge from php, but without duplicates..
Supports unlimited number of arrays as arguments.
Parameters:
|
Array |
$array1: |
the first array |
|
Array |
$array2: |
the second array |
API Tags:
| Return: | The result of the merge between $array1 and $array2 |
atk_array_merge_keys [line 608]
Array atk_array_merge_keys(
[Array $array = unlimited number of arrays]
)
|
|
Same as array_merge from php, but this function preserves key=>index association in case of numerical indexes. Supports unlimited number of arrays as arguments.
Parameters:
|
Array |
$array: |
unlimited number of arrays |
API Tags:
| Return: | The result of the merge between the given arrays |
atk_array_merge_recursive [line 576]
array atk_array_merge_recursive(
array $array1, array $array2
)
|
|
Same as array_merge_recursive from PHP but without duplicates.
Supports unlimited number of arrays as arguments.
Parameters:
|
array |
$array1: |
first array |
|
array |
$array2: |
second array |
API Tags:
atk_get_trace [line 404]
void atk_get_trace(
[ $format = "html"]
)
|
|
Parameters:
API Tags:
| Deprecated: | Use atkGetTrace instead |
atk_htmlentities [line 1836]
String atk_htmlentities(
String $string, [int $quote_style = ENT_COMPAT], [String $charset = null]
)
|
|
ATK version of the PHP htmlentities function. Works just like PHP's htmlentities function, but falls back to atkGetCharset() instead of PHP's default charset, if no charset is given.
Parameters:
|
String |
$string: |
string to convert |
|
int |
$quote_style: |
quote style (defaults to ENT_COMPAT) |
|
String |
$charset: |
character set to use (default to atkGetCharset()) |
API Tags:
atk_html_entity_decode [line 1852]
String atk_html_entity_decode(
String $string, [int $quote_style = ENT_COMPAT], [String $charset = null]
)
|
|
ATK version of the PHP html_entity_decode function. Works just like PHP's html_entity_decode function, but falls back to atkGetCharset() instead of PHP's default charset, if no charset is given.
Parameters:
|
String |
$string: |
string to convert |
|
int |
$quote_style: |
quote style (defaults to ENT_COMPAT) |
|
String |
$charset: |
character set to use (default to atkGetCharset()) |
API Tags:
atk_iconv [line 2017]
string atk_iconv(
string $in_charset, string $out_charset, string $str
)
|
|
ATK wrapper of the PHP iconv function. Check if iconv function is present in the system. If yes - use it for converting string, if no - save string untouch and make warning about it.
Parameters:
|
string |
$in_charset: |
from charset |
|
string |
$out_charset: |
to charset |
|
string |
$str: |
string to convert |
API Tags:
atk_in_array [line 633]
bool atk_in_array(
mixed $needle, Array $haystack, [boolean $strict = false]
)
|
|
Since php triggers an error if you perform an in_array on an uninitialised array, we provide a small wrapper that performs an is_array on the haystack first, just to make sure the user doesn't get an error message.
Parameters:
|
mixed |
$needle: |
The value to search for. |
|
Array |
$haystack: |
The array to search. |
|
boolean |
$strict: |
If true, type must match. |
API Tags:
| Return: | wether or not the value is in the array |
atk_in_array_recursive [line 1772]
Boolean atk_in_array_recursive(
String $needle, Array $haystack
)
|
|
Recursive function to look if the needle exists in the haystack
WARNING: take care with using this function as it is recursive and if you have a value linking back to it's self in one way or another, you may spend a loooong time waiting on your application
Parameters:
|
String |
$needle: |
The value which will be searched in the haystack |
|
Array |
$haystack: |
Array with values |
API Tags:
| Return: | True if needle exists in haystack |
atk_stripslashes [line 743]
void atk_stripslashes(
var &$var
)
|
|
Same as strip_slashes from php, but if the passed value is an array, all elements of the array are stripped. Recursive function.
Parameters:
|
var |
&$var: |
the value/array to strip the slashes of |
atk_strlen [line 1862]
int atk_strlen(
string $str
)
|
|
Get string length
Parameters:
|
string |
$str: |
The string being checked for length |
atk_strpos [line 1886]
int|boolean atk_strpos(
object $haystack, object $needle, [ $offset = 0], object $offset[optional]
)
|
|
Find position of first occurrence of string in a string
Parameters:
|
object |
$haystack: |
The string being checked. |
|
object |
$needle: |
The position counted from the beginning of haystack . |
|
object |
$offset[optional]: |
The search offset. If it is not specified, 0 is used. |
|
|
$offset: |
|
atk_strtolower [line 1896]
string atk_strtolower(
string $str
)
|
|
Make a string lowercase
Parameters:
|
string |
$str: |
The string being lowercased. |
atk_strtoupper [line 1907]
string atk_strtoupper(
string $str
)
|
|
Make a string uppercase
Parameters:
|
string |
$str: |
The string being uppercased. |
atk_substr [line 1874]
string atk_substr(
string $str, int $start, [ $length = ''], int $length[optional]
)
|
|
Get part of string
Parameters:
|
string |
$str: |
The string being checked. |
|
int |
$start: |
The first position used in $str |
|
int |
$length[optional]: |
The maximum length of the returned string |
|
|
$length: |
|
atk_value_in_array [line 1745]
bool atk_value_in_array(
Array $array
)
|
|
Recursive function that checks an array for values because sometimes arrays will be filled with other empty arrays and therefore still show up filled.
WARNING: take care with using this function as it is recursive and if you have a value linking back to it's self in one way or another, you may spend a loooong time waiting on your application
Parameters:
|
Array |
$array: |
The array that |
API Tags:
| Return: | Wether or not we found anything |
atk_var_dump [line 1127]
void atk_var_dump(
$a $a, [$d $d = ""]
)
|
|
Does a var dump of an array. Makes use of atkdebug for displaying the values.
Parameters:
|
$a |
$a: |
data to be displayed |
|
$d |
$d: |
name of the data that's being displayed. |
buildQueryString [line 1433]
void buildQueryString(
array $params, [ $parent = ""]
)
|
|
Build query string based on an array of parameters.
Parameters:
|
array |
$params: |
array of parameters |
|
|
$parent: |
|
dataSetContains [line 647]
bool dataSetContains(
array $set, var $key, var $value
)
|
|
Function dataSetContains
Checks if a value is in a Array
Parameters:
|
array |
$set: |
the array |
|
var |
$key: |
the key in the array as in $array[$key] |
|
var |
$value: |
the value we are looking for |
API Tags:
| Return: | wether or not the value is in the array |
decodeKeyValuePair [line 675]
array decodeKeyValuePair(
string $pair
)
|
|
Translates a string like id='3' into Array("id"=>3)
Parameters:
|
string |
$pair: |
the string which is to be decoded |
API Tags:
| Return: | the decoded array |
decodeKeyValueSet [line 696]
array decodeKeyValueSet(
string $set
)
|
|
Translates a string like id='3 AND name='joe'' into Array("id"=>3,"name"=>"joe")
Parameters:
|
string |
$set: |
the string to decode |
API Tags:
| Return: | the decoded array |
Information Tags:
| Todo: | we should also support <=>, >=, >, <=, <, <> |
dispatch_url [line 1471]
string dispatch_url(
string $node, string $action, [ $params = array()], [string $phpfile = ''], string $params:
)
|
|
Generate a dispatch menu URL for use with nodes and their specific actions.
Note that this does not necessarily create a link to the current php file (dispatch.php, index.php). It asks the controller which one to use.
Parameters:
|
string |
$node: |
the (module.)node name |
|
string |
$action: |
the atk action the link will perform |
|
string |
$params:: |
A key/value array with extra options for the url |
|
string |
$phpfile: |
The php file to use for dispatching, if not set we look at the theme for the dispatchfile |
|
|
$params: |
|
API Tags:
| Return: | url for the node with the action |
elapsed [line 189]
API Tags:
| Return: | elapsed time in microseconds |
| Deprecated: | Use atkDebugger::elapsed(); |
encodeKeyValueSet [line 727]
string encodeKeyValueSet(
array $set
)
|
|
Translates Array("id"=>3,"name"=>"joe") into a string like id='3 AND name='joe''
Parameters:
|
array |
$set: |
the array to be encoded |
API Tags:
| Return: | the encoded string |
escapeForRegex [line 1794]
String escapeForRegex(
String $pattern
)
|
|
Escapes the predefined characters
When there are predefined characters used this function will escape them and returns right pattern.
Parameters:
|
String |
$pattern: |
Raw string to be escaped |
API Tags:
| Return: | Returns a pattern with the predefined pattern escaped |
escapeSQL [line 990]
String escapeSQL(
String $string, [boolean $wildcard = false]
)
|
|
Wrapper for escapeSQL function
Parameters:
|
String |
$string: |
The string to escape. |
|
boolean |
$wildcard: |
Set to true to convert wildcard chars ('%'). False (default) will leave them unescaped. |
API Tags:
| Return: | A SQL compatible version of the input string. |
exportData [line 1143]
void exportData(
$data, $filename, [ $compression = ""]
)
|
|
This function writes data to the browser for download.
$data is the data to download. $filename is the name the file will get when the user downloads it. $compression can be "zip", "gzip" or "bzip", which causes the data to be compressed before transmission.
Parameters:
|
|
$data: |
|
|
|
$filename: |
|
|
|
$compression: |
|
exportFile [line 1223]
bool exportFile(
string $file, string $filename, [string $mimetype = ""], [ $detectmime = true]
)
|
|
This function writes a binary file to the browser for download.
Parameters:
|
string |
$file: |
the local filename (the file you want to open on the serverside) |
|
string |
$filename: |
the name the file will get when the user downloads it. |
|
string |
$mimetype: |
the mimetype of the file |
|
|
$detectmime: |
|
API Tags:
| Return: | wether or not the export worked |
getClassName [line 1653]
string getClassName(
string $classpath, [bool $class = true]
)
|
|
Converts a pathname ("/map1/map2/class.classname.inc")
to an ATK classname ("map1.map2.classname")
Parameters:
|
string |
$classpath: |
pathname to be converted |
|
bool |
$class: |
is the file a class? defaults to true |
API Tags:
| Return: | converted filename |
getClassPath [line 1641]
string getClassPath(
string $fullclassname, [bool $class = true]
)
|
|
Converts an ATK classname ("map1.map2.classname")
to a pathname ("/map1/map2/class.classname.inc")
Parameters:
|
string |
$fullclassname: |
ATK classname to be converted |
|
bool |
$class: |
is the file a class? defaults to true |
API Tags:
| Return: | converted filename |
getDispatchFile [line 1492]
API Tags:
| Deprecated: | Use atkcontroller::getPhpFile() instead. |
getmicrotime [line 178]
API Tags:
| Return: | the microtime |
| Deprecated: | Use atkDebugger::getMicroTime() |
getUniqueID [line 1350]
int getUniqueID(
string $sequence
)
|
|
Returns the next unique ID for the given sequence.
NOTE: ID's are only unique for the script execution!
Parameters:
|
string |
$sequence: |
the sequence name |
API Tags:
| Return: | next unique ID for the given sequence |
halt [line 132]
void halt(
$msg, [ $level = "warning"]
)
|
|
Parameters:
API Tags:
| Deprecated: | Use atkhalt instead. |
handleError [line 968]
Handle errors that occurred in ATK, available handlers from /atk/errors/ can be added to the error_handlers config.
hasFlag [line 1366]
bool hasFlag(
string $var, var $flag
)
|
|
Checks if the variable $var contains the given flag ($flag).
Parameters:
|
string |
$var: |
the variable which might contain flags |
|
var |
$flag: |
the flag you want to check for |
API Tags:
href [line 525]
void href(
$url, [ $name = ""], [ $sessionstatus = SESSION_DEFAULT], [ $saveform = false], [ $extraprops = ""]
)
|
|
Parameters:
|
|
$url: |
|
|
|
$name: |
|
|
|
$sessionstatus: |
|
|
|
$saveform: |
|
|
|
$extraprops: |
|
API Tags:
| Deprecated: | use atkHref or atkSessionManager::href instead. |
mailreport [line 955]
Send a detailed error report to the maintainer.
makeHiddenPostvars [line 1396]
void makeHiddenPostvars(
[array $excludes = array()]
)
|
|
Makes an string with hidden input fields containing all posted vars
Parameters:
|
array |
$excludes: |
array with the vars to exclude, default empty |
makeUrlFromPostvars [line 1376]
void makeUrlFromPostvars(
string $target, string 1
)
|
|
Makes an url from the target var and all postvars
Parameters:
|
string |
$target: |
the path of the file to open |
|
string |
1: |
the url with the postvars |
partial_url [line 1508]
string partial_url(
string $node, string $action, string $partial, [array $params = array()], [int $sessionStatus = SESSION_PARTIAL]
)
|
|
Generate a partial url.
Parameters:
|
string |
$node: |
the (module.)node name |
|
string |
$action: |
the atkaction |
|
string |
$partial: |
the partial name |
|
array |
$params: |
a key/value array with extra params |
|
int |
$sessionStatus: |
session status (default SESSION_PARTIAL) |
API Tags:
| Return: | url for the partial action |
session_form [line 500]
void session_form(
[ $sessionstatus = SESSION_DEFAULT], [ $returnbehaviour = NULL], [ $fieldprefix = '']
)
|
|
Parameters:
|
|
$sessionstatus: |
|
|
|
$returnbehaviour: |
|
|
|
$fieldprefix: |
|
API Tags:
| Deprecated: | Use atkSessionManager::formState instead. |
session_level [line 492]
void session_level(
[ $sessionstatus = SESSION_DEFAULT], [ $levelskip = 1]
)
|
|
Parameters:
|
|
$sessionstatus: |
|
|
|
$levelskip: |
|
API Tags:
| Deprecated: | Use atkSession::newLevel() instead |
session_url [line 516]
void session_url(
$url, [ $sessionstatus = SESSION_DEFAULT], [ $levelskip = 1]
)
|
|
Parameters:
|
|
$url: |
|
|
|
$sessionstatus: |
|
|
|
$levelskip: |
|
API Tags:
| Deprecated: | use atkSessionManager::sessionUrl() instead. |
session_vars [line 508]
void session_vars(
[ $sessionstatus = SESSION_DEFAULT], [ $levelskip = 1], [ $url = ""]
)
|
|
Parameters:
|
|
$sessionstatus: |
|
|
|
$levelskip: |
|
|
|
$url: |
|
API Tags:
| Deprecated: | Use atkSessionManager::sessionVars() instead. |
stringfields [line 839]
void stringfields(
$string
)
|
|
Get the [ ] Fields out of a String
Parameters:
API Tags:
| Deprecated: | please use the atkStringParser class |
stringparse [line 870]
void stringparse(
$string, $data, [ $encode = false]
)
|
|
Parse strings
Parameters:
API Tags:
| Deprecated: | please use the atkStringParser class |
stripQuotes [line 662]
string stripQuotes(
string $string
)
|
|
Strips ' or " from the begin and end of a string (only if they are on both sides, e.g. foo' remains foo' but 'bar' becomes bar.
Parameters:
|
string |
$string: |
the string we need to strip |
API Tags:
| Return: | the stripped string |
text [line 458]
String text(
mixed $string, [String $node = ""], [String $module = ""], [String $lng = ""], [String $firstfallback = ""], [boolean $nodefaulttext = false]
)
|
|
Replaces the [vars] with the values from the language files
Please note that it is important, for performance reasons, that you pass along the module where the language files can be found
Parameters:
|
mixed |
$string: |
string or array of strings containing the name(s) of the string to return when an array of strings is passed, the second will be the fallback if the first one isn't found, and so forth |
|
String |
$module: |
module in which the language file should be looked for, defaults to core module with fallback to ATK |
|
String |
$node: |
the node to which the string belongs |
|
String |
$lng: |
ISO 639-1 language code, defaults to config variable |
|
String |
$firstfallback: |
the first module to check as part of the fallback |
|
boolean |
$nodefaulttext: |
if true, then it doesn't return a default text when it can't find a translation |
API Tags:
| Return: | the string from the languagefile |
| Deprecated: | Use atktext instead |
triggerError [line 1044]
void triggerError(
array &$rec, var$attrib $attrib, string $err, [string $msg = ""], [ $tab = ""], [ $label = ''], [ $module = 'atk']
)
|
|
Adds new element to error array en $record. When $msg is empty the multilange error string is used.
Parameters:
|
array |
&$rec: |
var in which to add element to error array |
|
string |
$err: |
multilanguage error string |
|
string |
$msg: |
optinal error string |
|
var$attrib |
$attrib: |
attributename or an array with attribute names |
|
|
$tab: |
|
|
|
$label: |
|
|
|
$module: |
|
useattrib [line 1280]
void useattrib(
string $attribute
)
|
|
Includes the file containing the specified attribute
Parameters:
|
string |
$attribute: |
The attribute to include in the format "module.attribute". ATK will search in [moduledir]/attributes/ for the attribute file. When no modulename is specified ATK will search for the attribute in [atkdir]/attributes/ |
usefilter [line 1291]
void usefilter(
$filter
)
|
|
Parameters:
userelation [line 1290]
void userelation(
string $relation
)
|
|
Includes the file containing the specified relation
Parameters:
|
string |
$relation: |
The relation to include in the format "module.relation". ATK will search in [moduledir]/relations/ for the relation file. When no modulename is specified ATK will search for the relation in [atkdir]/relations/ |
var_export [line 1093]
Adds var_export function to PHP versions older then PHP4.2
for documentation about var_export() see http://www.php.net/manual/en/function.var-export.php
Parameters:
zendimport [line 1606]
void zendimport(
string $classname
)
|
|
Imports a zend-file
Parameters:
|
string |
$classname: |
Name of class in zend-format (starting with a Capital) |
_wordwrap [line 946]
string _wordwrap(
string $line
)
|
|
Wrap lines, add a newline after 100 characters
Parameters:
|
string |
$line: |
the line to add new lines in |
API Tags:
| Return: | the line with newlines |