Ejemplo n.º 1
0
 public static function getInstance()
 {
     if (self::$instance == null) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/* Set up the include path */
@ini_set('magic_quotes_runtime', 0);
define('DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__));
if (!defined('USER_PATH')) {
    define('USER_PATH', DOCUMENT_ROOT);
}
if (!defined('INCLUDE_PATH')) {
    define('INCLUDE_PATH', DOCUMENT_ROOT);
}
$incPath = get_include_path();
set_include_path('libraries' . PATH_SEPARATOR . $incPath);
require_once INCLUDE_PATH . '/Core/testMinimumPhpVersion.php';
/* Zend Autoloader */
require_once INCLUDE_PATH . '/libraries/Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('Core_');
$autoloader->registerNamespace('Module_');
$autoloader->registerNamespace('HTML_');
$autoloader->registerNamespace('PEAR_');
/* Zend Session */
Zend_Session::start();
/* Start the front controller */
$controller = Core_FrontController::getInstance();
$controller->init();
$controller->dispatch();