当前位置: 首页>>代码示例>>PHP>>正文


PHP Autoloader::setCacheFilePath方法代码示例

本文整理汇总了PHP中Autoloader::setCacheFilePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Autoloader::setCacheFilePath方法的具体用法?PHP Autoloader::setCacheFilePath怎么用?PHP Autoloader::setCacheFilePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Autoloader的用法示例。


在下文中一共展示了Autoloader::setCacheFilePath方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->cacheFile = dirname(__FILE__) . 'class_path_cache.txt';
     $this->removeCacheFile();
     include_once dirname(dirname(dirname(__FILE__))) . '/extras/Autoloader.class.php';
     Autoloader::addClassPath(dirname(__FILE__) . '/classes_app/');
     Autoloader::addClassPath(dirname(__FILE__) . '/classes_shared/');
     Autoloader::setCacheFilePath($this->cacheFile);
     //Autoloader::excludeFolderNamesMatchingRegex('/^CVS|\..*$/');
     spl_autoload_register(array('Autoloader', 'loadClass'));
 }
开发者ID:jmhobbs,项目名称:MkLst,代码行数:12,代码来源:TestAutoloader.class.php

示例2: define

}
// ---------------------------------------------------------------
// CARGO LOS PARAMETROS DE CONFIGURACION.
// ---------------------------------------------------------------
$yaml = sfYaml::load('config/config.yml');
$config = $yaml['config'];
$_SESSION['audit'] = $config['audit_mode'];
$app = $config['app'];
$app['audit'] = $_SESSION['audit'];
$_SESSION['appPath'] = $app['path'];
// ---------------------------------------------------------------
// ACTIVAR EL AUTOLOADER DE CLASES Y FICHEROS A INCLUIR
// ---------------------------------------------------------------
define("APP_PATH", $_SERVER['DOCUMENT_ROOT'] . $app['path'] . "/");
include_once $app['framework'] . "Autoloader.class.php";
Autoloader::setCacheFilePath(APP_PATH . 'tmp/class_path_cache.txt');
Autoloader::excludeFolderNamesMatchingRegex('/^CVS|\\..*$/');
Autoloader::setClassPaths(array(APP_PATH . $app['framework'], APP_PATH . 'entities/', APP_PATH . 'lib/'));
spl_autoload_register(array('Autoloader', 'loadClass'));
//----------------------------------------------------------------
// ACTIVAR EL MOTOR DE PDF'S
// ---------------------------------------------------------------
if (file_exists($config['pdf'])) {
    include_once $config['pdf'];
} else {
    die("NO SE PUEDE ENCONTRAR EL MOTOR PDF");
}
//----------------------------------------------------------------
// ACTIVAR EL MOTOR TWIG PARA LOS TEMPLATES.
//----------------------------------------------------------------
if (file_exists($config['twig']['motor'])) {
开发者ID:albatronic,项目名称:hermes,代码行数:31,代码来源:index.php

示例3: error_reporting

 */
// Notificar solamente errores de ejecución
error_reporting(E_ERROR | E_WARNING | E_PARSE);
if (file_exists("../yaml/lib/sfYaml.php")) {
    include "../yaml/lib/sfYaml.php";
} else {
    die("NO EXISTE LA CLASE PARA LEER ARCHIVOS YAML\n");
}
// ---------------------------------------------------------------
// ACTIVAR EL AUTOLOADER DE CLASES Y FICHEROS A INCLUIR
// ---------------------------------------------------------------
include_once "Autoloader.class.php";
$path = str_replace("/bin/albatronic", "", __DIR__);
$path = str_replace("\\bin\\albatronic", "", $path);
// Para el caso de msdos
Autoloader::setCacheFilePath($path . '/tmp/class_path_cache.txt');
Autoloader::excludeFolderNamesMatchingRegex('/^CVS|\\..*$/');
Autoloader::setClassPaths(array(__DIR__ . "/", $path . '/entities/methods/', $path . '/entities/models/', $path . '/entities/abstract/'));
spl_autoload_register(array('Autoloader', 'loadClass'));
$config = sfYaml::load('../../config/config.yml');
$_SESSION['conections'] = $config['config']['conections'];
$_SESSION['debug'] = $config['config']['debug'];
$_SESSION['produccion'] = strtolower($config['config']['enviroment']) == 'prod';
$_SESSION['idiomas']['actual'] = 0;
$_SESSION['usuarioPortal']['Id'] = 1;
if ($argc < 2) {
    Fab::usage();
} else {
    if (!$_SESSION['produccion']) {
        Fab::interpreta($argv);
    } else {
开发者ID:albatronic,项目名称:agentescloud,代码行数:31,代码来源:fab.php

示例4: realpath

 */
$sitepath = realpath(dirname(__FILE__));
define('ROOT', $sitepath);
//echo $sitepath;
/*
 * define the sitepath url
 */
$base_url = 'http://' . $_SERVER['HTTP_HOST'] . '/beasiswa/';
//echo $base_url;
define('URL', $base_url);
$path = array(ROOT . '/libs/', ROOT . '/app/controllers/', ROOT . '/app/models/', ROOT . '/app/dao/');
//include ROOT.'/config/config.php';
include ROOT . '/libs/Autoloader.php';
include ROOT . '/libs/config.php';
include ROOT . '/app/akses.php';
Autoloader::setCacheFilePath(ROOT . '/libs/cache.txt');
Autoloader::setClassPaths($path);
Autoloader::register();
$registry = new Registry();
$registry->upload = new Upload();
$registry->view = new View();
$registry->db = Database::get_instance();
$registry->auth = new Auth();
$registry->auth->add_roles('admin');
$registry->auth->add_access('admin', 'admin', $akses['Admin']);
$registry->auth->add_access('auth', 'admin', 'logout');
$registry->auth->add_roles('pic');
$registry->auth->add_access('cuti', 'pic', $akses['Cuti']);
$registry->auth->add_access('surattugas', 'pic', $akses['Surattugas']);
$registry->auth->add_access('elemenBeasiswa', 'pic', $akses['ElemenBeasiswa']);
$registry->auth->add_access('kontrak', 'pic', $akses['Kontrak']);
开发者ID:nazimkabiri,项目名称:sims-beasiswa,代码行数:31,代码来源:index.php

示例5: session_start

<?php

session_start();
define('APP_ROOT', dirname(__FILE__) . '/protected');
// Get CoughPHP
require_once APP_ROOT . '/vendor/coughphp/load.inc.php';
require_once APP_ROOT . '/vendor/coughphp/as_database/load.inc.php';
require_once APP_ROOT . '/vendor/coughphp/extras/Autoloader.class.php';
Autoloader::addClassPath(APP_ROOT . '/models/');
Autoloader::setCacheFilePath(APP_ROOT . '/cache/cough_class_path_cache.txt');
spl_autoload_register(array('Autoloader', 'loadClass'));
// Get config stuff
require_once APP_ROOT . '/config/config.php';
require_once APP_ROOT . '/config/routes.php';
require_once APP_ROOT . '/config/database.php';
// Get system classes
require_once APP_ROOT . '/system/view.php';
require_once APP_ROOT . '/system/controller.php';
require_once APP_ROOT . '/system/uri.php';
// Parse URI
if (false === strpos($_SERVER['REQUEST_URI'], $config['uri_prefix'])) {
    die('Configuration Error - Bad uri_prefix');
}
$path = substr($_SERVER['REQUEST_URI'], strlen($config['uri_prefix']));
$components = explode('/', $path);
for ($i = 0; $i < count($components); ++$i) {
    if (empty($components[$i])) {
        unset($components[$i]);
    }
}
$controller_name = $config['default_controller'];
开发者ID:jmhobbs,项目名称:MkLst,代码行数:31,代码来源:index.php


注:本文中的Autoloader::setCacheFilePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。