\
Namespaces
Hazaar
HazaarTest
Classes
GeSHi The GeSHi Class.
IndexController
Markdown_Parser
Textile
Textile Textile parser.
TextileBag Class to allow simple assignment to members of the internal data array
TextileTag Class to allow contruction of HTML tags on conversion of an object to a string
Functions
set_log_level()
set_log_level($level)

Parameters

$level

No description

stdout()
stdout($level, $message, $job = null)

Parameters

$level

No description

$message

No description

$job

No description

geshi_langfile_algol68_vars()
geshi_langfile_algol68_vars()
stripos()
stripos($haystack, $needle, $offset = null)

Tags

Ignore

Parameters

$haystack

No description

$needle

No description

$offset

No description

stripos()
stripos($haystack, $needle, $offset = null)

Tags

Ignore

Parameters

$haystack

No description

$needle

No description

$offset

No description

geshi_highlight()
geshi_highlight($string, $language, $path = null, $return = false) : string
Easy way to highlight stuff. Behaves just like highlight_string

Tags

Since

1.0.2

Parameters

$string

No description

$language

No description

$path

No description

$return

No description

Returns

string

The code highlighted (if $return is true)

stripslashes_deep()
stripslashes_deep($value)

Parameters

$value

No description

htmlspecialchars_deep()
htmlspecialchars_deep($value)

Parameters

$value

No description

output_error_cache()
output_error_cache()
report_error()
report_error($type, $message)

Parameters

$type

No description

$message

No description

colorize()
colorize($level, $string)

Parameters

$level

No description

$string

No description

output_error_cache()
output_error_cache()
report_error()
report_error($type, $message)

Parameters

$type

No description

$message

No description

dupfind_strtolower()
dupfind_strtolower($value)

Parameters

$value

No description

make_header()
make_header($title)

Parameters

$title

No description

make_footer()
make_footer()
get_var()
get_var($var_name)

Parameters

$var_name

No description

Markdown()
Markdown($text)

Parameters

$text

No description

mdwp_add_p()
mdwp_add_p($text)

Parameters

$text

No description

mdwp_strip_p()
mdwp_strip_p($t)

Parameters

$t

No description

mdwp_hide_tags()
mdwp_hide_tags($text)

Parameters

$text

No description

mdwp_show_tags()
mdwp_show_tags($text)

Parameters

$text

No description

identify_modifier_markdown()
identify_modifier_markdown()
smarty_modifier_markdown()
smarty_modifier_markdown($text)

Parameters

$text

No description

errorAndDie()
errorAndDie()
Error and die

Tags

Since

1.0.0

error_handler()
error_handler($errno, $errstr, $errfile = null, $errline = null, $errcontext = null)

Parameters

$errno

No description

$errstr

No description

$errfile

No description

$errline

No description

$errcontext

No description

exception_handler()
exception_handler($e)

Parameters

$e

No description

shutdown_handler()
shutdown_handler()
basic_handler()
basic_handler($errno, $errstr, $errfile = null, $errline = null, $errcontext = null)

Parameters

$errno

No description

$errstr

No description

$errfile

No description

$errline

No description

$errcontext

No description

traceAndDie()
traceAndDie()
ake()
ake($array, $key, $default = null, $non_empty = false) : mixed
Array value normalizer

Returns a value from an array if it exists. If it doesn’t exist a default value can be specified. Otherwise null is returned.

This helps prevent array key not found errors in the PHP interpreter.

Tags

Since

1.0.0

Parameters

$arraymixed

The array to search.

$keymixed

The array key value to look for.

$defaultmixed

An optional default value to return if the key does not exist.

$non_empty

No description

Returns

mixed

The value if it exists in the array. Returns the default if it does not. Default is null if not specified.

akr()
akr($array, $key_from, $key_to)
Array Key Rename

Rename a key in an array to something else.

Parameters

$arrayarray

The array to work on.

$key_fromstring

The key name to rename.

$key_tostring

The key name to change to.

boolify()
boolify($value) : boolean
Normalize boolean values

This helper function will take a string representation of a boolean such as ‘t’, ‘true’, ‘yes’, ‘ok’ and return a boolean type value.

Tags

Since

1.0.0

Parameters

$valuestring

The string representation of the boolean

Returns

boolean
strbool()
strbool($value) : string
Retrieve string value of boolean

Normalise boolean string to ‘true’ or ‘false’ based on various boolean representations

Tags

Since

1.0.0

Parameters

$valuestring

The string representation of the boolean

Returns

string
is_boolean()
is_boolean($value) : boolean
Test whether a value is a boolean

Checks for various representations of a boolean, including strings of ‘true/false’ and ‘yes/no’.

Tags

Since

2.0.0

Parameters

$valuestring

The string representation of the boolean

Returns

boolean
yn()
yn($value)
The Yes/No function

Simply returns Yes or No based on a boolean value.

Tags

Returns

string

Parameters

$value

No description

coalesce()
coalesce() : mixed
Retreive first non-null value from parameter list

Takes a variable list of arguments and returns the first non-null value.

Tags

Since

1.0.0

Returns

mixed

The first non-NULL argument value, or NULL if all values are NULL.

is_multi_array()
is_multi_array($array) : boolean
Test of array is multi-dimensional

Test an array to see if it’s a multidimensional array and returns TRUE or FALSE.

Tags

Since

1.0.0

Parameters

$arrayarray

The array to test

Returns

boolean
is_assoc()
is_assoc($array) : boolean
Test of array is an associative array

Test an array to see if it is associative or numerically keyed. Returns TRUE for associative or FALSE for numeric.

Tags

Since

1.0.0

Parameters

$arrayarray

The array to test

Returns

boolean
array_flatten()
array_flatten($array, $delim = '=', $section_delim = ';')

Parameters

$array

No description

$delim

No description

$section_delim

No description

array_unflatten()
array_unflatten($items, $delim = '=', $section_delim = ';')

Parameters

$items

No description

$delim

No description

$section_delim

No description

base64url_encode()
base64url_encode($data)

Parameters

$data

No description

base64url_decode()
base64url_decode($data)

Parameters

$data

No description

array_seek()
array_seek($array, $count)
Seek the array cursor forward $count number of elements

Parameters

$array

No description

$count

No description

build_url()
build_url($scheme = 'http', $host = 'localhost', $port = null, $user = null, $pass = null, $path = null, $query = Array ( ) , $fragment = null)
Build a correctly formatted URL from argument list

This function will build a correctly formatted HTTP compliant URL using a list of parameters. If any of the parameters are null then they will be omitted from the formatted output, including any extra values.

For example, you can specify a username and a password which will be formatted as username:password\@. However if you omit the password you will simply get username\@.

Parameters

$schemestring

The protocol to use. Usually http or https.

$hoststring

Hostname

$portinteger

(optional) Port

$userstring

(optional) Username

$passstring

(optional) User password. If set, a username is required.

$pathstring

(optional) Path suffix

$queryarray

(optional) Array of parameters to send. ie: the stuff after the ‘?’. Uses http_build_query to generate string.

$fragmentstring

(optional) Anything to go after the ‘#’.

str_bytes()
str_bytes($bytes, $type = null, $precision = null, $exclude_suffix = false) : string
Byte to string formatter

Formats an integer representing a size in bytes to a human readable string representation.

Tags

Since

1.0.0

Parameters

$bytesint

The byte value to convert to a string.

$typestring

The type to convert to. Type can be: * B (bytes) * K (kilobytes) * M (megabytes) * G (giabytes) * T (terrabytes)

$precisionint

The number of decimal places to show.

$exclude_suffix

No description

Returns

string

The human readable byte string. eg: ’100 MB’.

bytes_str()
bytes_str($string) : int
String to bytes formatter

Returns an integer value representing a number of bytes from the standard bytes size string supplied.

Tags

Since

1.0.0

Parameters

$stringint

The byte string value to convert to an integer. eg: ‘100MB’

Returns

int

The number of bytes

seconds()
seconds($interval) : int
Convert a string interval to seconds

This function can be used to convert a string interval such as ’1 week’ into seconds. Currently supported intervals are seconds, minutes, hours, days and weeks. Months are not supported because some crazy crackpot decided to make them all different lengths, so without knowing which month we’re talking about, converting them to seconds is impossible.

Multiple interval support is also possible. Intervals can be separated with a comma (,) or the word ‘and’, for example:

<code class="php">
$foo = seconds('1 week, 2 days');
$bar = seconds('1 week and 2 days');
</code>

Both of these function calls will yeild the same result.

Tags

Since

1.0.0

Parameters

$intervalstring

The string interval to convert to seconds

Returns

int

Number of seconds in the interval

minutes()
minutes($interval) : int
Convert interval to minutes

Same as the seconds function except returns the number of minutes.

Tags

Since

1.0.0

Parameters

$interval

No description

Returns

int

Minutes in interval

hours()
hours($interval) : int
Convert interval to hours

Same as the seconds function except returns the number of hours.

Tags

Since

1.0.0

Parameters

$interval

No description

Returns

int

Hours in interval

days()
days($interval) : int
Convert interval to days

Same as the seconds function except returns the number of days.

Tags

Since

1.0.0

Parameters

$interval

No description

Returns

int

Days in interval

weeks()
weeks($interval) : int
Convert interval to weeks

Same as the seconds function except returns the number of weeks.

Tags

Since

1.0.0

Parameters

$interval

No description

Returns

int

Weeks in interval

years()
years($interval) : int
Convert interval to years

Same as the seconds function except returns the number of years.

Tags

Since

1.0.0

Parameters

$interval

No description

Returns

int

Years in interval

age()
age($date)
Get the age of a date.

This helper function will return the number of years between a specified date and now. Useful for getting an age.

Tags

Since

1.0.0

$retval int Number of years from the specified date to now.

Parameters

$date

No description

uptime()
uptime($seconds) : int
Convert interval to uptime string

This function will convert an integer of seconds into an uptime string similar to what is returned by the unix uptime command. ie: ’9 days 3:32:02’

Tags

Since

1.0.0

Parameters

$seconds

No description

Returns

int

Minutes in interval

str_fixtype()
str_fixtype($value) : mixed
Fix a numeric string

Sometimes a numeric (int or float) will be stored as a string variable. This can cause issues with functions that check the variable type to determine what to do with it. This function allows you to simply pass a variable through it and it will ‘fix’ it. If it is a string and is a numeric value, it will be converted to the appropriate variable type.

If the value is a string and is meant to be a string, it will be left alone.

Tags

Since

1.0.0

Parameters

$valuemixed

The variable to type check and possibly fix.

Returns

mixed

The fixed variable.

http_response_text()
http_response_text($code) : mixed
Helper function to get the status text for an HTTP response code

Parameters

$codeinteger

The response code.

Returns

mixed

A string containing the response text if the code is valid. False otherwise.

getallheaders()
getallheaders()
apache_request_headers()
apache_request_headers()
http_response_code()
http_response_code($code = null)

Parameters

$code

No description

guid()
guid()
dump()
dump($data = null)

Parameters

$data

No description

preg_match_array()
preg_match_array($patterns, $subject, $matches = null, $flags = 0, $offset = 0)

Parameters

$patterns

No description

$subject

No description

$matches

No description

$flags

No description

$offset

No description

money_format()
money_format($format, $number) : string
Replacement for the "built-in" PHP function money_format(), which isn't always built-in.

Some systems, particularly Windows (also possible BSD) the built-in money_format() function will not be defined. This is because it’s just a wrapper for a C function called strfmon() which isn’t available on all platforms (such as Windows).

Parameters

$formatmixed

The format specification, see

$numbermixed

The number to be formatted.

Returns

string

The formatted number.