本文整理汇总了PHP中Debug::getVerbosity方法的典型用法代码示例。如果您正苦于以下问题:PHP Debug::getVerbosity方法的具体用法?PHP Debug::getVerbosity怎么用?PHP Debug::getVerbosity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debug
的用法示例。
在下文中一共展示了Debug::getVerbosity方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: page
static function page($url = NULL)
{
if (empty($url) and !empty($_SERVER['HTTP_REFERER'])) {
$url = $_SERVER['HTTP_REFERER'];
}
Debug::Text('Redirect URL: ' . $url, __FILE__, __LINE__, __METHOD__, 11);
if (Debug::getVerbosity() != 11) {
header("Location: {$url}\n\n");
//Prevent the rest of the script from running after redirect?
Debug::writeToLog();
ob_clean();
exit;
}
return TRUE;
}
示例2: strlen
$pdf->setXY(29, 236);
$pdf->Cell(40, 6, $ein[1], $border, 0, 'L');
}
$pdf->setXY(82, 244);
$pdf->Cell(75, 6, $current_company->getName(), $border, 0, 'L');
$pdf->setXY(82, 253);
$pdf->Cell(45, 6, $current_company->getAddress1() . ' ' . $current_company->getAddress2(), $border, 0, 'L');
$pdf->setXY(82, 261);
$pdf->Cell(45, 6, $current_company->getCity() . ', ' . $current_company->getProvince() . ' ' . $current_company->getPostalCode(), $border, 0, 'L');
$pdf->setXY(157, 234);
$pdf->Cell(35, 6, Misc::getBeforeDecimal(Misc::MoneyFormat($lines_arr['total']['p1_6'], FALSE)), $border, 0, 'R');
$pdf->setXY(193, 234);
$pdf->Cell(6, 6, Misc::getAfterDecimal(Misc::MoneyFormat($lines_arr['total']['p1_6'], FALSE)), $border, 0, 'L');
}
$output = $pdf->Output('', 'S');
if (Debug::getVerbosity() == 11) {
Debug::Display();
} else {
Misc::FileDownloadHeader('f940ez.pdf', 'application/pdf', strlen($output));
echo $output;
}
exit;
}
}
break;
case 'delete':
case 'save':
Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10);
$generic_data['id'] = UserGenericDataFactory::reportFormDataHandler($action, $filter_data, $generic_data, URLBuilder::getURL(NULL, $_SERVER['SCRIPT_NAME']));
unset($generic_data['name']);
default:
示例3: InitProgressBar
InitProgressBar(10);
for ($i = 0; $i < 11; $i++) {
$progress_bar->display();
$progress_bar->incValue();
if ($i % 2 == 0) {
sleep(1);
}
}
break;
}
?>
</div>
<?php
sleep(2);
if (Debug::getVerbosity() <= 10) {
if (isset($next_page) and $next_page != '') {
?>
<script type="text/javascript">parent.location.href='<?php
echo $next_page;
?>
'</script>
<?php
}
}
if (Debug::getVerbosity() > 10) {
Debug::Display();
}
Debug::writeToLog();
?>
</body>
</html>
示例4: strlen
if ($output !== FALSE and Debug::getVerbosity() < 11) {
Misc::FileDownloadHeader('roe.xml', 'application/octetstream', strlen($output));
echo $output;
exit;
} else {
echo TTi18n::gettext("ERROR: ROE not available, it may be deleted!") . "<br>\n";
exit;
}
} else {
$show_background = TRUE;
if ($action == 'print') {
$show_background = FALSE;
}
$output = $rlf->getROE($rlf, (bool) $show_background);
//Debug::Display();
if ($output !== FALSE and Debug::getVerbosity() < 11) {
Misc::FileDownloadHeader('roe.pdf', 'application/pdf', strlen($output));
echo $output;
exit;
} else {
echo TTi18n::gettext("ERROR: ROE not available, it may be deleted!") . "<br>\n";
exit;
}
}
}
break;
case 'add':
Redirect::Page(URLBuilder::getURL(array('user_id' => $user_id), 'EditROE.php', FALSE));
break;
case 'delete' or 'undelete':
if (strtolower($action) == 'delete') {
示例5: TTnew
if (count($ids) > 0) {
$psalf = TTnew('PayStubAmendmentListFactory');
//Use Pay Stub permission as this for exporting data for payroll.
if ($permission->Check('pay_stub', 'view') == FALSE) {
if ($permission->Check('pay_stub', 'view_child')) {
$filter_data['permission_children_ids'] = $permission_children_ids;
}
if ($permission->Check('pay_stub', 'view_own')) {
$filter_data['permission_children_ids'][] = $current_user->getId();
}
}
$filter_data['id'] = $ids;
$psalf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data);
$output = $psalf->exportPayStubAmendment($psalf, $export_type);
if ($output !== FALSE) {
if (Debug::getVerbosity() < 11) {
if (stristr($export_type, 'cheque')) {
Misc::FileDownloadHeader('checks_' . str_replace(array('/', ',', ' '), '_', TTDate::getDate('DATE', time())) . '.pdf', 'application/pdf', strlen($output));
} else {
//Include file creation number in the exported file name, so the user knows what it is without opening the file,
//and can generate multiple files if they need to match a specific number.
$ugdlf = TTnew('UserGenericDataListFactory');
$ugdlf->getByCompanyIdAndScriptAndDefault($current_company->getId(), 'PayStubFactory', TRUE);
if ($ugdlf->getRecordCount() > 0) {
$ugd_obj = $ugdlf->getCurrent();
$setup_data = $ugd_obj->getData();
}
if (isset($setup_data)) {
$file_creation_number = $setup_data['file_creation_number']++;
} else {
$file_creation_number = 0;
示例6: displayPDF
function displayPDF()
{
$output = $this->getPDF();
if (Debug::getVerbosity() == 11) {
Debug::Display();
} else {
Misc::FileDownloadHeader($this->getFileName(), 'application/pdf', strlen($output));
echo $output;
exit;
}
}
示例7: setNewDatabaseConnection
function setNewDatabaseConnection($type, $host, $user, $password, $database_name)
{
if ($this->getDatabaseConnection() !== FALSE) {
$this->getDatabaseConnection()->Close();
}
try {
$db = ADONewConnection($type);
$db->SetFetchMode(ADODB_FETCH_ASSOC);
$db->Connect($host, $user, $password, $database_name);
if (Debug::getVerbosity() == 11) {
$db->debug = TRUE;
}
//MySQLi extension uses an object, not a resource.
if (is_resource($db->_connectionID) or is_object($db->_connectionID)) {
$this->setDatabaseConnection($db);
//$this->temp_db = $db;
return TRUE;
}
} catch (Exception $e) {
return FALSE;
}
return FALSE;
}