Exemplo n.º 1
0
 /**
  * Disables the last callback.
  *
  * @since Method available since Release 1.5.0
  */
 function disableCallback()
 {
     Piece_Unity_Error::pushCallback(array(__CLASS__, 'handleError'));
 }
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * @package    Piece_Unity
 * @copyright  Piece Project
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License (revised)
 * @version    SVN: $Id$
 * @since      File available since Release 1.0.0
 */
error_reporting(E_ALL);
if (file_exists(dirname(__FILE__) . '/../../imports')) {
    set_include_path(dirname(__FILE__) . '/../../imports/pear' . PATH_SEPARATOR . dirname(__FILE__) . '/../../imports/spyc-0.2.5');
}
require_once 'Piece/Unity.php';
require_once 'Piece/Unity/Error.php';
Piece_Unity_Error::pushCallback(create_function('$error', 'var_dump($error); return ' . PEAR_ERRORSTACK_DIE . ';'));
$base = dirname(__FILE__) . '/../webapp';
ini_set('session.cookie_path', str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])));
session_save_path("{$base}/sessions");
$unity =& new Piece_Unity("{$base}/config", "{$base}/cache");
$unity->setConfiguration('Configurator_AppRoot', 'appRoot', dirname(__FILE__));
$unity->setConfiguration('Renderer_Flexy', 'turnOffLayoutByHTTPAccept', true);
$unity->dispatch();
/*
 * Local Variables:
 * mode: php
 * coding: iso-8859-1
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * indent-tabs-mode: nil