Exemplo n.º 1
0
 public static function Instance($name)
 {
     if (!self::$instancia) {
         $logWriter = new Slim_LogWriter(fopen($name, 'a+'));
         self::$instancia = new Slim(array('mode' => 'development', 'debug' => 1, 'log.enabled' => true, 'cookies.secure' => 0, 'cookies.encrypt' => true, 'cookies.secret_key' => 'llave_secreta', 'cookies.cipher' => MCRYPT_RIJNDAEL_256, 'cookies.cipher_mode' => MCRYPT_MODE_CBC, 'log.level' => Slim_Log::DEBUG, 'log.writer' => $logWriter));
         self::handlerError();
         self::setup();
     }
     return self::$instancia;
 }
Exemplo n.º 2
0
 * 
 * This program incorporates work covered by the following copyright and
 * permission notices:
 * 
 * DropsizeMVCf is (c) 2013, 2015 
 * Isaac Trenado - isaac.trenado@codigolimpio.com -
 * http://www.codigolimpio.com
 * 
 * Wherever third party code has been used, credit has been given in the code's comments.
 *
 * DropsizeMVCf is released under the GPL
 * 
 */
/**
 * Import and Run APP invoke all BO CO MO DE.
 * here goes all library for default too can use path_library PHP
 * 
 * @package com.dropsizemvcf.utils.legacy.framework
 * @author  Isaac Trenado
 * @since   1.0.0
 */
defined('_DSEXEC') or die;
PhpClass::import(FPATH_LIBRARIES . DIRECTORY_SEPARATOR . "Slim" . DIRECTORY_SEPARATOR . "Slim");
PhpClass::import(FPATH_LIBRARIES . DIRECTORY_SEPARATOR . "Slim" . DIRECTORY_SEPARATOR . "LogWriter");
PhpClass::import(FPATH_LIBRARIES . DIRECTORY_SEPARATOR . "Slim" . DIRECTORY_SEPARATOR . "Log");
PhpClass::import(FPATH_LIBRARIES . DIRECTORY_SEPARATOR . "Model");
PhpClass::import(FPATH_LIBRARIES . DIRECTORY_SEPARATOR . "Controller");
PhpClass::import(FPATH_LIBRARIES . DIRECTORY_SEPARATOR . "legacy" . DIRECTORY_SEPARATOR . "aplicacion");
$hostname = "log";
$app = FDropSize::Instance($hostname);
$app->run();