YANA 4 PHP Framework
Docs For Class Yana
«Singleton» Yana
This is a primary controller and application loader for the YANA-Framework.
Located in /includes/class_yana.php
Object | --Singleton | --Yana
to load language strings
This variable is «readonly».
to communicate with plugins
This variable is «readonly».
to read and write data to the global registry
This variable is «readonly».
to load skins and templates
This variable is «readonly».
Name | Type | Description |
---|---|---|
$filename | string | path to system.config |
$ARGS | array | associative array of request vars |
This function creates a new instance of the framework. Note that you may only operate one instance at a time.
Name | Type | Description |
---|---|---|
$source | string | name of the database *.config file that describes the names and structure of tables within the database (see config/db/*.config) |
Returns a ready-to-use database connection.
If you enter more than 1 argument, each additional database structure file will be loaded as well and merged with the others.
Example:
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
Returns the value identified by $key from a untainted, merged copy of the $_POST and $_GET arrays.
Note that this version is case-insensitive.
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
Name | Type | Description |
---|---|---|
$event | string | (optional) script action parameter |
$ARGS | array | (optional) array of passed arguments |
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
$array | array | associative array to merge |
Name | Type | Description |
---|---|---|
$level | string | type of message ('OK'|'ALERT'|'ERROR') |
$errcode | string | code of corresponding message in message.config |
$event | string | upcoming event to route to |
Examples:
- global $YANA;
- // error - page not found
- // internal error
- // alert - entry allready exists
- // (the token 'ID' is used in the error message)
- // OK - changes have been saved
- // output message and route to 'login' page
Name | Type | Description |
---|---|---|
$log | Report | object containing the log entry |
The entry will be printed to screen or written to log-file, depending on it's base-class.
Examples:
- global $YANA;
- // report an error level message
- $msg = new error("Oups! Something went wrong and I can't fix it.");
- // report a warning level message
- $msg = new warning("the string 'my dog ate my homework' is not a valid excuse");
- // report an alert level message
- $msg = new alert("Swimming in lava might cause your shorts to catch fire");
- // report a status level message
- // report a log entry
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
$type | string | new type of variable |
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
$value | mixed | new value (may be scalar value or array) |
The "registry" is memory shared by all plugins.
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
$value | mixed | new value (may be scalar value or array) |
&$value |
The "registry" is memory shared by all plugins.
Name | Type | Description |
---|---|---|
$key | string | adress of data in memory (case insensitive) |
Inherited From Singleton
Inherited From Object
Documentation generated on Wed, 22 Nov 2006 20:19:20 +0100 by phpDocumentor 1.3.1