本文整理汇总了PHP中Installer::numErrors方法的典型用法代码示例。如果您正苦于以下问题:PHP Installer::numErrors方法的具体用法?PHP Installer::numErrors怎么用?PHP Installer::numErrors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Installer
的用法示例。
在下文中一共展示了Installer::numErrors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAvailableProfilesConformToSchema
public function testAvailableProfilesConformToSchema()
{
$va_profiles = caGetAvailableXMLProfiles(dirname(__FILE__) . '/../../install/');
$this->assertGreaterThan(0, sizeof($va_profiles));
foreach ($va_profiles as $vs_profile) {
$vo_installer = new Installer(dirname(__FILE__) . '/../../install/profiles/xml/', $vs_profile, 'info@collectiveaccess.org', false, false);
$this->assertEquals(0, $vo_installer->numErrors(), "The profile '{$vs_profile}' doesn't conform to the XML schema");
}
}
示例2: Installer
<script type="text/javascript">
jQuery('#progressbar').progressbar({
value: 0
});
</script>
<div id="installerLog" class="installStatus">
</div>
<?php
$vn_progress = 0;
// parameters: profile dir, profile name, admin email, overwrite y/n, profile debug mode y/n
$vo_installer = new Installer("profiles/xml/", $ps_profile, $ps_email, $pb_overwrite, $pb_debug);
// if profile validation against XSD failed, we already have an error here
if ($vo_installer->numErrors()) {
caSetMessage("There were errors parsing the profile(s): " . join("; ", $vo_installer->getErrors()));
} else {
caIncrementProgress($vn_progress, "Performing preinstall tasks");
$vo_installer->performPreInstallTasks();
caIncrementProgress($vn_progress, "Loading schema");
$vo_installer->loadSchema('caGetTableToBeLoaded');
if ($vo_installer->numErrors()) {
caSetMessage("There were errors loading the database schema: " . join("; ", $vo_installer->getErrors()));
} else {
$vn_progress += 7;
caIncrementProgress($vn_progress, "Processing locales");
$vo_installer->processLocales();
caIncrementProgress($vn_progress, "Processing lists");
$vo_installer->processLists('caGetListToBeLoaded');
$vn_progress += 7;