本文整理汇总了PHP中AutoLoader::listModules方法的典型用法代码示例。如果您正苦于以下问题:PHP AutoLoader::listModules方法的具体用法?PHP AutoLoader::listModules怎么用?PHP AutoLoader::listModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AutoLoader
的用法示例。
在下文中一共展示了AutoLoader::listModules方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<td><?php
echo InstallUtilities::installTextField('emailReceiptPw', '', InstallUtilities::PARAM_SETTING, true, array('type' => 'password'));
?>
</td>
</tr>
<tr>
<td><b>STMP Security</b>:</td>
<td><?php
echo InstallUtilities::installSelectField('emailReceiptSSL', array('none', 'SSL', 'TLS'), 'none');
?>
</td>
</tr>
<tr>
<td><b>HTML Receipt Builder</b>:</td>
<?php
$mods = AutoLoader::listModules('DefaultHtmlEmail');
sort($mods);
$e_mods = array('' => '[None]');
foreach ($mods as $m) {
$e_mods[$m] = $m;
}
?>
<td><?php
echo InstallUtilities::installSelectField('emailReceiptHtml', $e_mods, '');
?>
</td>
</tr>
<tr><td colspan=2 class="submitBtn">
<input type=submit name=esubmit value="Save Changes" />
</td></tr>
</table>
示例2:
</td></tr>
<tr>
<td colspan=2>
<b>Variable Weight Item Mapping</b> (UPC Prefix "2"):<br />
Variable-weight items do not have identical barcodes because the
price is encoded in the barcode. A translator is required to map
these different barcodes back to one logical product.
</td>
</tr>
<tr>
<td>
<b>Translator</b>:
</td>
<td>
<?php
$mods = AutoLoader::listModules('VariableWeightReWrite');
echo InstallUtilities::installSelectField('VariableWeightReWriter', $mods, 'ZeroedPriceReWrite');
?>
</td>
</tr>
<tr><td colspan=2>
<hr />
</td></tr>
<tr><td>
<input type=submit name=scansubmit value="Save Changes" />
</td></tr></table>
</form>
</div> <!-- wrapper -->
</body>
</html>
示例3: testFormat
public function testFormat()
{
$mods = AutoLoader::listModules('DefaultReceiptFormat');
if (empty($this->record_sets)) {
$this->record_sets[] = $this->test_records;
}
foreach ($mods as $format_class) {
$obj = new $format_class();
$this->assertInternalType('boolean', $obj->is_bold);
foreach ($this->record_sets as $set) {
foreach ($set as $line) {
$output = $obj->format($line);
$this->assertInternalType('string', $output);
}
}
}
}
示例4: substr
$not_default_args[] = $code;
}
if (count($not_default_args) > 0) {
$not_default_sql = substr($not_default_sql, 0, strlen($not_default_sql) - 1);
$defaultP = $db->prepare('
UPDATE tenders
SET TenderModule=\'TenderModule\'
WHERE TenderCode NOT IN (' . $not_default_sql . ')');
$db->execute($defaultP, $not_default_args);
} else {
$db->query("UPDATE tenders SET TenderModule='TenderModule'");
}
CoreLocal::set('TenderMap', $settings);
}
}
$mods = AutoLoader::listModules('TenderModule');
// Tender Report: Desired tenders column
$settings2 = CoreLocal::get("TRDesiredTenders");
if (!is_array($settings2)) {
$settings2 = array();
}
if (isset($_REQUEST['TR_LIST'])) {
$saveStr2 = "array(";
$settings2 = array();
foreach ($_REQUEST['TR_LIST'] as $dt) {
if ($dt == "") {
continue;
}
list($code2, $name2) = explode(":", $dt);
$settings2[$code2] = $name2;
$saveStr2 .= "'" . $code2 . "'=>'" . addslashes($name2) . "',";
示例5: ob_get_clean
$details = ob_get_clean();
if ($changes === false) {
echo 'An error occurred.';
} else {
echo 'Update complete.';
}
printf(' <a href="" onclick="$(\'#updateDetails\').toggle();return false;"
>Details</a><pre style="display:none;" id="updateDetails">%s</pre>', $details);
}
}
echo '</div>';
}
// list available updates
$cmd = new ReflectionClass('BasicModel');
$cmd = $cmd->getFileName();
$mods = AutoLoader::listModules('BasicModel');
$adds = 0;
$unknowns = 0;
$errors = 0;
echo '<ul>';
foreach ($mods as $class) {
if ($class == 'ViewModel') {
// just a helper subclass not an
// actual structure
continue;
}
$model = new $class(null);
$db_name = InstallUtilities::normalizeDbName($model->preferredDB());
if ($db_name === false) {
echo '<li>Error: Unknown database "' . $model->preferredDB() . '" for model ' . $class;
$errors++;
示例6: foreach
$obj->pluginEnable();
}
}
foreach ($oldset as $plugin_class) {
if (!in_array($plugin_class, $newset) && class_exists($plugin_class)) {
$obj = new $plugin_class();
$obj->pluginDisable();
}
}
CoreLocal::set('PluginList', $_REQUEST['PLUGINLIST']);
}
$type_check = CoreLocal::get('PluginList');
if (!is_array($type_check)) {
CoreLocal::set('PluginList', array());
}
$mods = AutoLoader::listModules('Plugin');
sort($mods);
foreach ($mods as $m) {
$enabled = False;
$instance = new $m();
foreach (CoreLocal::get("PluginList") as $r) {
if ($r == $m) {
$enabled = True;
break;
}
}
echo '<tr><td colspan="2" style="height:1px;"><hr /></td></tr>';
echo '<tr><td style="width:10em;"></td>
<td style="width:25em;">' . "\n";
echo '<fieldset class="toggle">' . "\n";
printf('<input name="PLUGINLIST[]" id="plugin_%s" type="checkbox" %s
示例7: 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);
}
}