Framework class that holds helper methods
Framework Framework( )
Class constructor that actually disallows creating instances of the class
void croak( string $message, [mixed $die = true], string $sql, string $error)
Display a nicely formatted error
void forward( string $controller, string $action)
Forwards request to another Controller/Action
mixed getConfiguration( string $section, [string $var = null])
Returns a configuration setting. If $var is not set, will return a whole section. If the requested configuration is not found, null is returned.
string getControllerClassName( string $controller)
Generates a controller class name
<?php // will return Default_Controller Framework::getControllerClassName("dEfAuLt") ?>
string getControllerPath( string $controller)
Generates a full path to the controller file
object PEAR::DB getDatabaseConnection( )
(Singleton) Returns a database connection
string getModelClassName( string $model)
Generates a Model class name
<?php // will return Post Framework::getModelClassName("PoSt") ?>
string getModelPath( string $model)
Generates a full path to the model file
string getViewClassName( string $view)
Generates a View Handler class name
<?php // will return Php_View Framework::getViewClassName("PhP") ?>
string getViewPath( string $view)
Generates a full path to the view handler file
string pluralize( string $word)
Returns the plural version of a string
void redirect( [string $controller = ""], [string $action = ""])
HTML-Redirects to another URL and ends execution of current code. If no controller/action is set, will redirect to default values set in config.ini.php
string singularize( $word $word)
Returns the singular version of a string