本文整理汇总了PHP中TCPDF_STATIC::unserializeTCPDFtagParameters方法的典型用法代码示例。如果您正苦于以下问题:PHP TCPDF_STATIC::unserializeTCPDFtagParameters方法的具体用法?PHP TCPDF_STATIC::unserializeTCPDFtagParameters怎么用?PHP TCPDF_STATIC::unserializeTCPDFtagParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCPDF_STATIC
的用法示例。
在下文中一共展示了TCPDF_STATIC::unserializeTCPDFtagParameters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: openHTMLTagHandler
//.........这里部分代码省略.........
$prop['readonly'] = true;
}
if (isset($tag['attribute']['name']) and !TCPDF_STATIC::empty_string($tag['attribute']['name'])) {
$name = $tag['attribute']['name'];
} else {
break;
}
if (isset($tag['attribute']['value']) and !TCPDF_STATIC::empty_string($tag['attribute']['value'])) {
$opt['v'] = $tag['attribute']['value'];
}
if (isset($tag['attribute']['cols']) and !TCPDF_STATIC::empty_string($tag['attribute']['cols'])) {
$w = intval($tag['attribute']['cols']) * $this->GetStringWidth(chr(32)) * 2;
} else {
$w = 40;
}
if (isset($tag['attribute']['rows']) and !TCPDF_STATIC::empty_string($tag['attribute']['rows'])) {
$h = intval($tag['attribute']['rows']) * $this->getCellHeight($this->FontSize);
} else {
$h = 10;
}
$prop['multiline'] = 'true';
$this->TextField($name, $w, $h, $prop, $opt, '', '', false);
break;
case 'select':
$h = $this->getCellHeight($this->FontSize);
if (isset($tag['attribute']['size']) and !TCPDF_STATIC::empty_string($tag['attribute']['size'])) {
$h *= $tag['attribute']['size'] + 1;
}
$prop = array();
$opt = array();
if (isset($tag['attribute']['name']) and !TCPDF_STATIC::empty_string($tag['attribute']['name'])) {
$name = $tag['attribute']['name'];
} else {
break;
}
$w = 0;
if (isset($tag['attribute']['opt']) and !TCPDF_STATIC::empty_string($tag['attribute']['opt'])) {
$options = explode('#!NwL!#', $tag['attribute']['opt']);
$values = array();
foreach ($options as $val) {
if (strpos($val, '#!TaB!#') !== false) {
$opts = explode('#!TaB!#', $val);
$values[] = $opts;
$w = max($w, $this->GetStringWidth($opts[1]));
} else {
$values[] = $val;
$w = max($w, $this->GetStringWidth($val));
}
}
} else {
break;
}
$w *= 2;
if (isset($tag['attribute']['multiple']) and $tag['attribute']['multiple'] = 'multiple') {
$prop['multipleSelection'] = 'true';
$this->ListBox($name, $w, $h, $values, $prop, $opt, '', '', false);
} else {
$this->ComboBox($name, $w, $h, $values, $prop, $opt, '', '', false);
}
break;
case 'tcpdf':
if (defined('K_TCPDF_CALLS_IN_HTML') and K_TCPDF_CALLS_IN_HTML === true) {
// Special tag used to call TCPDF methods
if (isset($tag['attribute']['method'])) {
$tcpdf_method = $tag['attribute']['method'];
if (method_exists($this, $tcpdf_method)) {
if (isset($tag['attribute']['params']) and !empty($tag['attribute']['params'])) {
$params = TCPDF_STATIC::unserializeTCPDFtagParameters($tag['attribute']['params']);
call_user_func_array(array($this, $tcpdf_method), $params);
} else {
$this->{$tcpdf_method}();
}
$this->newline = true;
}
}
}
break;
default:
break;
}
// define tags that support borders and background colors
$bordertags = array('blockquote', 'br', 'dd', 'dl', 'div', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'li', 'ol', 'p', 'pre', 'ul', 'tcpdf', 'table');
if (in_array($tag['value'], $bordertags)) {
// set border
$dom[$key]['borderposition'] = $this->getBorderStartPosition();
}
if ($dom[$key]['self'] and isset($dom[$key]['attribute']['pagebreakafter'])) {
$pba = $dom[$key]['attribute']['pagebreakafter'];
// check for pagebreak
if ($pba == 'true' or $pba == 'left' or $pba == 'right') {
// add a page (or trig AcceptPageBreak() for multicolumn mode)
$this->checkPageBreak($this->PageBreakTrigger + 1);
}
if ($pba == 'left' and (!$this->rtl and $this->page % 2 == 0 or $this->rtl and $this->page % 2 != 0) or $pba == 'right' and (!$this->rtl and $this->page % 2 != 0 or $this->rtl and $this->page % 2 == 0)) {
// add a page (or trig AcceptPageBreak() for multicolumn mode)
$this->checkPageBreak($this->PageBreakTrigger + 1);
}
}
return $dom;
}