Exemplo n.º 1
0
 public function indexAction()
 {
     Framework_View::getInstance()->addStyleSheet('/css/chat.css');
     Framework_View::getInstance()->addScript('/js/jquery-1.3.2.min.js');
     Framework_View::getInstance()->addScript('/js/chat.js');
     Framework_View::getInstance()->htmlResult('chat');
 }
Exemplo n.º 2
0
 public function getView()
 {
     return Framework_View::getInstance();
 }
Exemplo n.º 3
0
   dont get distributed.

   in db-config.php please define
	DB_NAME
	DB_USER
	DB_PASSWORD
	DB_HOST
*/
require_once '../db-config.php';
define('APP_BASE', dirname(__FILE__));
set_include_path(APP_BASE . '/Library' . PATH_SEPARATOR . get_include_path());
require_once "Framework.php";
spl_autoload_register(array('Framework', 'autoload'));
$db = Framework_DB::getInstance();
$db->setConnectionString(sprintf("mysql:dbname=%s;host=%s", DB_NAME, DB_HOST));
$db->setUsername(DB_USER);
$db->setPassword(DB_PASSWORD);
$view = Framework_View::getInstance();
//set some defaults
$view->setMetaData('keywords', 'Jared Quinn, examples, demo');
$view->setMetaData('description', 'A quick collections of demos and examples by Jared Quinn');
$view->setMetaData('robots', 'nofollow');
$dispatch = Framework_Dispatcher::getInstance($_SERVER['REQUEST_URI']);
$dispatch->default_system = 'Demo';
$dispatch->default_controller = 'Index';
$dispatch->default_action = 'index';
$dispatch->setupDispatch($view);
$view->addStyleSheet('/css/common.css');
$view->addStyleSheet('/css/' . strtolower($dispatch->system) . '/common.css');
$dispatch->dispatch();
$view->render();
Exemplo n.º 4
0
 public function __construct()
 {
     parent::__construct();
     Framework_View::getInstance()->addStyleSheet('/css/demo/facebook.css');
     Framework_View::getInstance()->addScript('/js/jquery-1.3.2.min.js');
 }