TITAN Library for PHP5  5.1.0
Web Software Development Kit for PHP5
functions Class Reference

Titan Misc Functions. More...

Detailed Description

Titan Misc Functions.

Author
James E. Bush work@.nosp@m.bush.nosp@m..cc
Version
5.1.0

Functions:

\tl\add_include_path($path, $prefix = true)
    Add a path to the PHP include_path

    string     $path               Path to add


\tl\array_copy($arry)
    Make a recursive (deep) copy of an array

    array      $arry               The array to copy
    return array                   Copy of source array


\tl\contains($haystack, $needle)
    Does the string $haystack contain any of the values in $needle (may be string or array)?

    string     $haystack           The text to search in
    mixed      $needle             The string or array of strings to search for
    return boolean                 Success?


\tl\cookie($name, $value = '', $expire = '', $path = '/', $secure = false, $http_only = true)
    Set or delete a cookie

    string     $name               The cookie name
    string     $value              (optional) The cookie value
                                   (default) "" = erase cookie
    string     $expire             (optional) When to expire (in strtotime() compatible format)
                                   (default) "" = never expire
    string     $path               (optional) The path on the server in which the cookie will be available.
                                       If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories.
                                   (default) "/" = The cookie will be available within the entire domain.
    boolean    $secure             (optional) Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client.
                                   (default) false
    boolean    $http_only          (optional) When TRUE the cookie will be made accessible only through the HTTP protocol.
                                       This means that the cookie won't be accessible by scripting languages, such as JavaScript.
                                   (default) true


\tl\generate_unique_hash($max_length = null)
    Generate a unique hash as randomly as possible

    mixed      $max_length         (optional) Maximum length to return
                                   (default) NULL = no size limit


\tl\getval(&$obj, $key, $default = null, $string = false)
    Safely get a value

    mixed          $obj            The object or array to get the value from (by reference)
    string         $key            The key for the value
    mixed          $default        (optional) Default value if key does not exist
                                   (default) null
    boolean        $string         (optional) Return the result as a string only?
                                   (default) false
    return mixed                   The value or default


\tl\_GET($key, $default = null, $string = false)
    Safely get a $_GET value

    string         $key            The key for the value
    mixed          $default        (optional) Default value if key does not exist
                                   (default) null
    boolean        $string         (optional) Return the result as a string only?
                                   (default) false
    return mixed                   The value or default


\tl\_POST($key, $default = null, $string = false)
    Safely get a $_GET value

    string         $key            The key for the value
    mixed          $default        (optional) Default value if key does not exist
                                   (default) null
    boolean        $string         (optional) Return the result as a string only?
                                   (default) false
    return mixed                   The value or default


\tl\_SERVER($key, $default = null, $string = false)
    Safely get a $_SERVER value

    string         $key            The key for the value
    mixed          $default        (optional) Default value if key does not exist
                                   (default) null
    boolean        $string         (optional) Return the result as a string only?
                                   (default) false
    return mixed                   The value or default


\tl\_COOKIE($key, $default = null, $string = false)
    Safely get a $_COOKIE value

    string         $key            The key for the value
    mixed          $default        (optional) Default value if key does not exist
                                   (default) null
    boolean        $string         (optional) Return the result as a string only?
                                   (default) false
    return mixed                   The value or default


\tl\log_message($message, $file = null)
    Write to the application log file using error_log

    string         $message        Message to save
    return boolean                 Success?

The documentation for this class was generated from the following file: