本文整理汇总了PHP中AutoLoader::loadMap方法的典型用法代码示例。如果您正苦于以下问题:PHP AutoLoader::loadMap方法的具体用法?PHP AutoLoader::loadMap怎么用?PHP AutoLoader::loadMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AutoLoader
的用法示例。
在下文中一共展示了AutoLoader::loadMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
<?php
include realpath(dirname(__FILE__) . '/../lib/AutoLoader.php');
AutoLoader::loadMap();
include '../ini.php';
CoreState::loadParams();
include 'InstallUtilities.php';
?>
<html>
<head>
<title>Debug Settings</title>
<style type="text/css">
body {
line-height: 1.5em;
}
</style>
</head>
<body>
<?php
include 'tabs.php';
?>
<div id="wrapper">
<h2>IT CORE Lane Installation: Debug Settings</h2>
<b>Logs</b><br />
Default logs:
<ul>
<li><i>php-errors.log</i> contains PHP errors, warnings, notices, etc depending on error reporting settings for PHP installation.</li>
<li><i>queries.log</i> lists failed queries</li>
</ul>
<div class="alert"><?php
InstallUtilities::checkWritable('../log/php-errors.log');
示例2: testAutoLoader
public function testAutoLoader()
{
// get codepath where session var is not array
CoreLocal::set('ClassLookup', false);
AutoLoader::loadClass('LocalStorage');
$this->assertEquals(true, class_exists('LocalStorage', false));
AutoLoader::loadMap();
$class_map = CoreLocal::get('ClassLookup');
$this->assertInternalType('array', $class_map);
$this->assertNotEmpty($class_map);
/**
Verify base classes and required libraries
were properly discovered
*/
$required_classes = array('AutoLoader', 'Authenticate', 'PreParser', 'Parser', 'BasicCorePage', 'TenderModule', 'DisplayLib', 'ReceiptLib', 'Database', 'Kicker', 'SpecialUPC', 'SpecialDept', 'DiscountType', 'PriceMethod', 'LocalStorage', 'FooterBox', 'Plugin', 'PrintHandler');
foreach ($required_classes as $class) {
$this->assertArrayHasKey($class, $class_map);
$this->assertFileExists($class_map[$class]);
}
$mods = AutoLoader::listModules('Parser');
$this->assertInternalType('array', $mods);
$this->assertNotEmpty($mods);
foreach ($mods as $m) {
$obj = new $m();
$this->assertInstanceOf('Parser', $obj);
}
$listable = array('DiscountType', 'FooterBox', 'Kicker', 'Parser', 'PreParser', 'PriceMethod', 'SpecialUPC', 'SpecialDept', 'TenderModule', 'TenderReport', 'DefaultReceiptDataFetch', 'DefaultReceiptFilter', 'DefaultReceiptSort', 'DefaultReceiptTag', 'DefaultReceiptSavings', 'ReceiptMessage', 'CustomerReceiptMessage', 'ProductSearch', 'DiscountModule', 'PrintHandler', 'TotalAction', 'VariableWeightReWrite', 'ItemNotFound');
foreach ($listable as $base_class) {
$mods = AutoLoader::listModules($base_class);
$this->assertInternalType('array', $mods);
}
}