classForPath (line 85)
Imports and returns the class name given a class dot path
Examples:
- php2go.base.Document => imports Document class and returns "Document"
- php2go.auth.AuthDb => imports AuthDb class and returns "AuthDb"
string
classForPath
(string $path)
consumeArray (line 367)
Read a key from an array, and remove it
mixed
consumeArray
( &$array, string $key, [mixed $fallback = NULL], array $array)
-
array
$array: Input array
-
string
$key: Key
-
mixed
$fallback: Fallback return value
-
&$array
dbErrorHandler (line 267)
Default handler for database errors
void
dbErrorHandler
(string $dbms, string $function, int $errorCode, string $errorMessage, [mixed $p1 = FALSE], [mixed $p2 = FALSE], &$connection, ADOConnection $connection)
-
string
$dbms: Driver name
-
string
$function: DB function
-
int
$errorCode: Error code
-
string
$errorMessage: Error message
-
mixed
$p1: First parameter of the database command
-
mixed
$p2: Second parameter of the database command
-
ADOConnection
$connection: Active database connection
-
&$connection
destroyPHP2GoObjects (line 176)
Calls registered destructors and shutdown functions
This function is automatically called when the script shuts down. It is registered as a shutdown function by the framework's initialization routine.
void
destroyPHP2GoObjects
()
dumpArray (line 387)
Returns or prints a human readable version of an array
string
dumpArray
(array $arr, [bool $return = TRUE], [int $stringLimit = 200], [bool $deep = FALSE], [ $i = 0])
-
array
$arr: Input array
-
bool
$return: Return or print
-
int
$stringLimit: Maxlength for strings
-
bool
$deep: Recurse into inner arrays or objects
-
$i
dumpVariable (line 353)
Dumps a variable, using pre tags
void
dumpVariable
(mixed $var)
-
mixed
$var: Variable value
exportVariable (line 430)
Returns the human readable representation of a variable
string
exportVariable
(mixed $var, [bool $formatted = FALSE])
-
mixed
$var: Variable
-
bool
$formatted: Whether to use pre tags
findArrayPath (line 462)
Find a path in a multidimensional array
Examples:
$arr = array(
'connection' => array(
'host' => 'localhost',
'port' => 80
)
);
mixed
findArrayPath
(array $arr, string $path, [string $separator = '.'], [mixed $fallback = NULL])
-
array
$arr: Input array
-
string
$path: Path
-
string
$separator: Path separator
-
mixed
$fallback: Fallback value
getPhp2GoOffset (line 113)
Calculates the offset between current folder and PHP2Go root
string
getPhp2GoOffset
()
highlightPHP (line 494)
Highlight PHP code
string
highlightPHP
(string $code, [int $type = T_BYVAR])
-
string
$code: Code string or file name
-
int
$type: Type (T_BYFILE or T_BYVAR)
import (line 38)
Imports a class or file, given its "dot path"
bool
import
(string $modulePath, [string $extension = 'class.php'], [bool $isClass = TRUE])
-
string
$modulePath: Dot path of a file or class
-
string
$extension: Class or file extension
-
bool
$isClass: Indicates the path points to a class
importFile (line 51)
Imports a file given its path
bool
importFile
(string $filePath)
-
string
$filePath: File path
includeFile (line 63)
Includes a file given its path
mixed
includeFile
(string $filePath, [bool $return = FALSE])
-
string
$filePath: File path
-
bool
$return: Return the result of the include call
jsrsDispatch (line 159)
Configures a list of JSRS handlers
void
jsrsDispatch
(string $handlersList)
-
string
$handlersList: Space separated list of handlers
php2GoAssertionHandler (line 236)
Custom handler for assertion errors
void
php2GoAssertionHandler
(string $fileName, int $lineNumber, string $expressionCode)
-
string
$fileName: File path
-
int
$lineNumber: Line number
-
string
$expressionCode: Failed expression
php2GoErrorHandler (line 210)
Framework's custom error handler
void
php2GoErrorHandler
(int $errorCode, string $errorMessage, string $fileName, int $lineNumber, array $vars)
-
int
$errorCode: Error code
-
string
$errorMessage: Error message
-
string
$fileName: File path
-
int
$lineNumber: Line number
-
array
$vars: Local variables
println (line 343)
Utility function to print a value and a line break
void
println
(string $str, [string $nl = '<br />'])
-
string
$str: Input string
-
string
$nl: New line string
resolveBooleanChoice (line 509)
Resolves strings representing a boolean choice: T or F
T => TRUE, F => FALSE, other values => NULL.
bool|NULL
resolveBooleanChoice
([string $value = NULL])
-
string
$value: Input value
resolveI18nEntry (line 528)
Resolves language entries
Used by the forms API to allow internationalization in some special attributes of the XML specification.
string
resolveI18nEntry
(string $value)
-
string
$value: Input string
setupError (line 293)
Displays a setup error
void
setupError
(string $msg)
-
string
$msg: Error message
__ (line 311)
Shortcut function to retrieve the value of a language entry
string|NULL
__
()
__autoload (line 99)
Autoload interceptor
void
__autoload
(string $className)
-
string
$className: Class name
__v (line 330)
Used by template engine to print variable values
This function is only used when PHP version is lower than 5. In PHP5, objects will automatically have their __toString method called when used in a print statement.
void
__v
( &$val, mixed $val)
-
mixed
$val: Variable value
-
&$val