本文整理汇总了PHP中HTML2PDF::textGET方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML2PDF::textGET方法的具体用法?PHP HTML2PDF::textGET怎么用?PHP HTML2PDF::textGET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML2PDF
的用法示例。
在下文中一共展示了HTML2PDF::textGET方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Footer
public function Footer()
{
$txt = '';
if ($this->footer_param['form']) {
$txt = HTML2PDF::textGET('pdf05');
}
if ($this->footer_param['date'] && $this->footer_param['heure']) {
$txt .= ($txt ? ' - ' : '') . HTML2PDF::textGET('pdf03');
}
if ($this->footer_param['date'] && !$this->footer_param['heure']) {
$txt .= ($txt ? ' - ' : '') . HTML2PDF::textGET('pdf01');
}
if (!$this->footer_param['date'] && $this->footer_param['heure']) {
$txt .= ($txt ? ' - ' : '') . HTML2PDF::textGET('pdf02');
}
if ($this->footer_param['page']) {
$txt .= ($txt ? ' - ' : '') . HTML2PDF::textGET('pdf04');
}
if (strlen($txt) > 0) {
$txt = str_replace('[[date_d]]', date('d'), $txt);
$txt = str_replace('[[date_m]]', date('m'), $txt);
$txt = str_replace('[[date_y]]', date('Y'), $txt);
$txt = str_replace('[[date_h]]', date('H'), $txt);
$txt = str_replace('[[date_i]]', date('i'), $txt);
$txt = str_replace('[[date_s]]', date('s'), $txt);
$txt = str_replace('[[current]]', $this->PageNo(), $txt);
$txt = str_replace('[[nb]]', '{nb}', $txt);
parent::SetY(-11);
$this->setOverline(false);
$this->SetFont('helvetica', 'I', 8);
$this->Cell(0, 10, $txt, 0, 0, 'R');
}
}
示例2: __construct
/**
* generer une erreur HTML2PDF
*
* @param int numero de l'erreur
* @param mixed indications suplementaires sur l'erreur
* @return string code HTML eventuel associé à l'erreur
*/
public final function __construct($err = 0, $other = null, $html = '')
{
// creation du message d'erreur
$msg = '';
switch ($err) {
case 1:
$msg = HTML2PDF::textGET('err01');
$msg = str_replace('[[OTHER]]', $other, $msg);
$this->tag = $other;
break;
case 2:
$msg = HTML2PDF::textGET('err02');
$msg = str_replace('[[OTHER_0]]', $other[0], $msg);
$msg = str_replace('[[OTHER_1]]', $other[1], $msg);
$msg = str_replace('[[OTHER_2]]', $other[2], $msg);
break;
case 3:
$msg = HTML2PDF::textGET('err03');
$msg = str_replace('[[OTHER]]', $other, $msg);
$this->tag = $other;
break;
case 4:
$msg = HTML2PDF::textGET('err04');
$msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
break;
case 5:
$msg = HTML2PDF::textGET('err05');
$msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
break;
case 6:
$msg = HTML2PDF::textGET('err06');
$msg = str_replace('[[OTHER]]', $other, $msg);
$this->image = $other;
break;
case 7:
$msg = HTML2PDF::textGET('err07');
break;
case 8:
$msg = HTML2PDF::textGET('err08');
$msg = str_replace('[[OTHER]]', $other, $msg);
$this->tag = $other;
break;
case 9:
$msg = HTML2PDF::textGET('err09');
$msg = str_replace('[[OTHER_0]]', $other[0], $msg);
$msg = str_replace('[[OTHER_1]]', $other[1], $msg);
$this->tag = $other[0];
break;
}
// creation du message HTML
$this->message_html = '<span style="color: #AA0000; font-weight: bold;">' . HTML2PDF::textGET('txt01') . $err . '</span><br>';
$this->message_html .= HTML2PDF::textGET('txt02') . ' ' . $this->file . '<br>';
$this->message_html .= HTML2PDF::textGET('txt03') . ' ' . $this->line . '<br>';
$this->message_html .= '<br>';
$this->message_html .= $msg;
// creation du message classique
$msg = HTML2PDF::textGET('txt01') . $err . ' : ' . strip_tags($msg);
if ($html) {
$this->message_html .= "<br><br>HTML : ..." . trim(htmlentities($html)) . '...';
$this->html = $html;
$msg .= ' HTML : ...' . trim($html) . '...';
}
parent::__construct($msg, $err);
}
示例3: makeError
function makeError($err, $file, $line, $other = null)
{
$msg = '';
switch ($err) {
case 1:
$msg = HTML2PDF::textGET('err01');
$msg = str_replace('[[OTHER]]', $other, $msg);
break;
case 2:
$msg = HTML2PDF::textGET('err02');
$msg = str_replace('[[OTHER_0]]', $other[0], $msg);
$msg = str_replace('[[OTHER_1]]', $other[1], $msg);
$msg = str_replace('[[OTHER_2]]', $other[2], $msg);
break;
case 3:
$msg = HTML2PDF::textGET('err03');
$msg = str_replace('[[OTHER]]', $other, $msg);
break;
case 4:
$msg = HTML2PDF::textGET('err04');
$msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
break;
case 5:
$msg = HTML2PDF::textGET('err05');
$msg = str_replace('[[OTHER]]', print_r($other, true), $msg);
break;
case 6:
$msg = HTML2PDF::textGET('err06');
$msg = str_replace('[[OTHER]]', $other, $msg);
break;
}
echo '<span style="color: #AA0000; font-weight: bold;">' . HTML2PDF::textGET('txt01') . $err . '</span><br>';
echo HTML2PDF::textGET('txt02') . ' ' . $file . '<br>';
echo HTML2PDF::textGET('txt03') . ' ' . $line . '<br>';
echo '<br>';
echo $msg;
exit;
}