-
Notifications
You must be signed in to change notification settings - Fork 0
Famework_Registry
LaCodon edited this page Mar 1, 2016
·
2 revisions
namespace Famework\Registry
This class offers an application wide registry (global variables). The registry is not available across requests.
Set a registry entry.
Throws Famework_Exception_Registry_Error if $name is already used
static void set(string $name, mixed $value)| Parameter | Purpose |
|---|---|
| name | The identifier |
| value | The value to store |
Get a registry entry.
Throws Famework_Exception_Registry_Error
static mixed get(string $name [, $strict = TRUE])| Parameter | Purpose |
|---|---|
| name | The identifier |
| strict | If $strict is TRUE, an exception will be thrown if $name is not set. |
| RETURN | The value or NULL |
Get database instance, set by Famework::_construct if your config.ini provides DB credentials, else:
Throws Famework_Exception_Database_Fail
static \PDO getDb()Set the application environment.
static void setEnv(int $env)| Parameter | Purpose |
|---|---|
| env | 1: DEVELOPMENT; 2: PRODUCTION |
Get the application environment.
static int getEnv()| Parameter | Purpose |
|---|---|
| RETURN | 1: DEVELOPMENT; 2: PRODUCTION |
Get the current Famework_View.
static \Famework\View\Famework_View getView()- Home
- Getting Started
- Server Setup
- Configuration Files
- Application Structure
- Classes