Beispiel #1
0
<?php

/**
 * Add a project specific startup here
 */
global $_PATHS, $_ENVIRONMENT;
Pfw_Loader::loadFile("pfw_routes.php", $_PATHS['conf']);
Pfw_Loader::loadClass('Pfw_Controller_Front');
Pfw_Loader::loadClass('Pfw_PluginManager');
Pfw_Loader::loadClass('Pfw_Session');
Pfw_Loader::loadClass('Pfw_Alert');
// initialize the session
Pfw_Session::start();
// initialize the plugin manager
Pfw_PluginManager::init();
// initialize alerts
Pfw_Alert::init();
// turn off error display for production
if ($_ENVIRONMENT == "production") {
    ini_set('display_errors', 0);
    ini_set('log_errors', 1);
}
// setup front controller and routing
$front = Pfw_Controller_Front::getInstance();
$front->getRouter()->setRoutes($_pfw_routes)->setModules($_pfw_modules);
$four_oh_four = false;
try {
    $front->dispatch();
} catch (Pfw_Exception_System $e) {
    $e->emitLog();
    if ($_ENVIRONMENT == "development") {
Beispiel #2
0
<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
 * @package       Pfw
 * @author        Sean Sitter <*****@*****.**>
 * @copyright     2010 The Picnic PHP Framework
 * @license       http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
 * @link          http://www.picnicphp.com
 * @since         0.10
 * @filesource
 */
Pfw_Loader::loadFile('Smarty/Smarty_Compiler.class.php');
/**
 * Short description for file
 *
 * Long description for file (if any)...
 *
 * @category      Framework
 * @package       Pfw
 */
class Pfw_Smarty_Compiler extends Smarty_Compiler
{
    function _compile_tag($template_tag)
    {
        /* Split tag into two three parts: command, command modifiers and the arguments. */
        if (!preg_match('~^(?:(' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '|\\/?' . $this->_reg_obj_regexp . '|\\/?' . $this->_func_regexp . ')(' . $this->_mod_regexp . '*))
                      (?:\\s+(.*))?$
                    ~xs', $template_tag, $match)) {
            $this->_syntax_error("unrecognized tag: {$template_tag}", E_USER_ERROR, __FILE__, __LINE__);
        }
Beispiel #3
0
<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
 * @package       Pfw
 * @author        Sean Sitter <*****@*****.**>
 * @copyright     2010 The Picnic PHP Framework
 * @license       http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
 * @link          http://www.picnicphp.com
 * @since         0.10
 * @filesource
 */
global $_PATHS;
Pfw_Loader::loadFile('Smarty/Smarty.class.php');
/**
 * Short description for file
 *
 * Long description for file (if any)...
 *
 * @category      Framework
 * @package       Pfw
 */
class Pfw_Smarty_Standard extends Smarty
{
    protected $css_linkrel_arr = array();
    protected $ext_css_linkrel_arr = array();
    protected $css_attr_arr = array();
    protected $js_linkrel_arr = array();
    protected $ext_js_linkrel_arr = array();
    protected $js_attr_arr = array();
    protected $my_css_links = array();