Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class DataUtil

Class: DataUtil

Source Location: /pnobjlib/DataUtil.class.php

Class Overview


DataUtil

Methods


Inherited Variables

Inherited Methods


Class Details

[line 20] DataUtil



[ Top ]

Class Methods


method censor [line 400]

The censor( var $var)

Censor variable contents. This method is recursive array safe.



Tags:

return:  censored variable


Parameters:

var   $var   The variable to censor

[ Top ]

method cleanVar [line 29]

The cleanVar( var $var)

Clean a variable, remove slashes. This method is recursive array safe.



Tags:

return:  formatted variable


Parameters:

var   $var   The variable to clean

[ Top ]

method convertFromUTF8 [line 544]

converted convertFromUTF8( [input $input = ''])

convertFromUTF8() converts a string from utf-8



Tags:

return:  string
author:  Frank Schummertz


Parameters:

input   $input   - string or array to convert from utf-8

[ Top ]

method convertToUTF8 [line 516]

converted convertToUTF8( [input $input = ''])

convertToUTF8() converts a string or an array (recursivly) to utf-8



Tags:

return:  string or array
author:  Frank Schummertz


Parameters:

input   $input   - string or array to convert to utf-8

[ Top ]

method decode [line 53]

The decode( value $value)

Decode a character a previously encoded character



Tags:

return:  decoded value


Parameters:

value   $value   The value we wish to encode

[ Top ]

method decrypt [line 70]

The decrypt( value $value, [key $key = null], [alg $alg = null], [encoded $encoded = true])

Decrypt the given value using the mcrypt library function. If the mcrypt functions do not exist, we fallback to the RC4 implementation which is shipped with Zikula.



Tags:

return:  decrypted value


Parameters:

value   $value   The value we wish to decrypt
key   $key   The encryption key to use (optional) (default=null)
alg   $alg   The encryption algirthm to use (only used with mcrypt functions) (optional) (default=null, signifies MCRYPT_RIJNDAEL_128)
encoded   $encoded   Whether or not the value is base64 encoded (optional) (default=true)

[ Top ]

method encode [line 96]

The encode( value $value)

Encode a character sting such that it's 8-bit clean. It maps to base64_encode().



Tags:

return:  encoded value


Parameters:

value   $value   The value we wish to encode

[ Top ]

method encrypt [line 113]

The encrypt( value $value, [key $key = null], [alg $alg = null], [encoded $encoded = true])

Encrypt the given value using the mcrypt library function. If the mcrypt functions do not exist, we fallback to the RC4 implementation which is shipped with Zikula.



Tags:

return:  encrypted value


Parameters:

value   $value   The value we wish to decrypt
key   $key   The encryption key to use (optional) (default=null)
alg   $alg   The encryption algirthm to use (only used with mcrypt functions) (optional) (default=null, signifies MCRYPT_RIJNDAEL_128)
encoded   $encoded   Whether or not the value is base64 encoded (optional) (default=true)

[ Top ]

method formatForDisplay [line 138]

The formatForDisplay( var $var)

Format a variable for display. This method is recursive array safe.



Tags:

return:  formatted variable


Parameters:

var   $var   The variable to format

[ Top ]

method formatForDisplayHTML [line 170]

The formatForDisplayHTML( var $var)

Format a variable for HTML display. This method is recursive array safe.



Tags:

return:  formatted variable


Parameters:

var   $var   The variable to format

[ Top ]

method formatForOS [line 298]

The formatForOS( var $var, [absolute $absolute = false])

Format a variable for operating-system usage. This method is recursive array safe.



Tags:

return:  formatted variable


Parameters:

var   $var   The variable to format
absolute   $absolute   Allow absolute paths (default=false) (optional)

[ Top ]

method formatForStore [line 271]

The formatForStore( var $var)

Format a variable for DB-storage. This method is recursive array safe.



Tags:

return:  formatted variable


Parameters:

var   $var   The variable to format

[ Top ]

method formatForURL [line 357]

void formatForURL( $var)





Parameters:

   $var  

[ Top ]

method formatPermalink [line 362]

void formatPermalink( $var)





Parameters:

   $var  

[ Top ]

method getBooleanIniValue [line 465]

boolean|mixed getBooleanIniValue( string $ini_key)

This method converts the several possible return values from allegedly "boolean" ini settings to proper booleans Properly converted input values are: 'off', 'on', 'false', 'true', '0', '1' If the ini_value doesn't match any of those, the value is returned as-is.



Tags:

author:  Ed Finkler


Parameters:

string   $ini_key   the ini_key you need the value of

[ Top ]

method hash [line 432]

string hash( $string $string, [$type $type = 'sha1'])

Perform SHA1 or SHA256 hashing on a string using native PHP functions if available and if not uses own classes.



Tags:

return:  hex hash
author:  Drak


Parameters:

$string   $string   string to be hashed
$type   $type   string md5, sha1 (default), sha256

[ Top ]

method is_serialized [line 499]

bool is_serialized( string $string)

check for serialization





Parameters:

string   $string  

[ Top ]

Packages:

Files:

Classes: