예제 #1
0
 /**
  * Coloca el nombre de la clase del registro
  * @param string $registryClassName Nombre de la clase del registro
  */
 public static function setClassName($registryClassName = 'Model3_Registry')
 {
     if (self::$_registry !== null) {
         require_once 'Model3/Exception.php';
         throw new Exception('Registry ya esta inicializado');
     }
     if (!is_string($registryClassName)) {
         require_once 'Model3/Exception.php';
         throw new Exception("El argument no es un nombre de clase");
     }
     require_once 'Model3/Loader.php';
     Model3_Loader::loadClass($registryClassName);
     self::$_registryClassName = $registryClassName;
 }
예제 #2
0
파일: index.php 프로젝트: laiello/masfletes
<?php

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', true);
set_include_path('../library/' . PATH_SEPARATOR . get_include_path());
set_include_path('../application/' . PATH_SEPARATOR . get_include_path());
set_include_path('../application/Controller/' . PATH_SEPARATOR . get_include_path());
set_include_path('../application/Model/' . PATH_SEPARATOR . get_include_path());
require_once 'Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', '../library/');
$classLoader->register();
// register on SPL autoload stack
require_once 'Model3/Loader.php';
Model3_Loader::registerAutoload();
//inicio de la aplicacion
Model3_Site::initSite('../application/Config/config.ini');
Model3_Site::dispatch(new Model3_Request());