pwet

Sign in or create your account | Project List | Help | pwet.fr | Planet eZ Publish.fr | Bioutifoul Photos

pwet Svn Source Tree

Root/trunk/www/index_rest.php

  • Property svn:keywords set to: Id HeadURL
1<?php
2/**
3 * File containing the rest bootstrap
4 *
5 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
6 * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
7 * @version 2011.7
8 * @package kernel
9 */
10
11require 'autoload.php';
12require 'kernel/private/rest/classes/lazy.php';
13
14// Below we are setting up a minimal eZ Publish environment from the old index.php
15// This is a temporary measure.
16
17// We want PHP to deal with all errors here.
18eZDebug::setHandleType( eZDebug::HANDLE_TO_PHP );
19$GLOBALS['eZGlobalRequestURI'] = eZSys::serverVariable( 'REQUEST_URI' );
20$ini = eZINI::instance();
21eZSys::init( 'index.php', $ini->variable( 'SiteAccessSettings', 'ForceVirtualHost' ) == 'true' );
22$uri = eZURI::instance( eZSys::requestURI() );
23$GLOBALS['eZRequestedURI'] = $uri;
24
25// load extensions
26eZExtension::activateExtensions( 'default' );
27
28// setup for eZSiteAccess:change() needs some methods defined in old index.php
29// We disable it, since we dont' want any override settings to change the
30// debug settings here
31function eZUpdateDebugSettings() {}
32
33// load siteaccess
34$access = eZSiteAccess::match( $uri,
35                      eZSys::hostname(),
36                      eZSys::serverPort(),
37                      eZSys::indexFile() );
38$access = eZSiteAccess::change( $access );
39
40// load siteaccess extensions
41eZExtension::activateExtensions( 'access' );
42
43// Now that all extensions are activated and siteaccess has been changed, reset
44// all eZINI instances as they may not take into account siteaccess specific settings.
45eZINI::resetAllInstances( false );
46
47if( ezpRestDebug::isDebugEnabled() )
48{
49    $debug = ezpRestDebug::getInstance();
50    $debug->updateDebugSettings();
51}
52
53
54$mvcConfig = new ezpMvcConfiguration();
55
56$frontController = new ezcMvcConfigurableDispatcher( $mvcConfig );
57$frontController->run();
58?>
59

Archive Download this file

Revision: HEAD