本文整理汇总了PHP中Container::getContent方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::getContent方法的具体用法?PHP Container::getContent怎么用?PHP Container::getContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Container
的用法示例。
在下文中一共展示了Container::getContent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getContent
/**
* Gets rtf code of header. Internal use.
* @return string
* @access public
*/
function getContent()
{
$content = isset($this->headery) ? '\\headery' . round(TWIPS_IN_CM * $this->headery) . ' ' : '';
$content .= '{\\' . $this->type . ' ';
$content .= parent::getContent();
$content .= '\\par ';
$content .= '}';
return $content . "\r\n";
}
示例2: getContent
/**
* Gets rtf code of Cell object. Internal use.
* @return string
* @access public
*/
function getContent()
{
$content = '{';
$content .= !empty($this->alignment) ? $this->alignment : '';
$content .= !empty($this->font) ? $this->font->getContent($this->rtf) : '';
$content .= Container::getContent() . '\\cell \\pard }' . "\r\n";
return $content;
}
示例3: getContent
/**
* Gets rtf code of section. Internal use.
* @return string
* @access public
*/
function getContent()
{
$content = '';
if (empty($this->first)) {
$content .= '\\sect \\sectd ';
}
//headers
if (!empty($this->headers)) {
foreach ($this->headers as $value) {
$content .= $value->getContent();
}
} else {
foreach ($this->rtf->headers as $value) {
$content .= $value->getContent();
}
}
//footers
if (!empty($this->footers)) {
foreach ($this->footers as $value) {
$content .= $value->getContent();
}
} else {
foreach ($this->rtf->footers as $value) {
$content .= $value->getContent();
}
}
//borders
if (!empty($this->bordered)) {
$content .= $this->bordered->getContent($this->rtf, '\\pg');
} else {
if (!empty($this->rtf->bordered)) {
$content .= $this->rtf->bordered->getContent($this->rtf, '\\pg');
}
}
//section properties
if (!empty($this->noBreak)) {
$content .= '\\sbknone ';
}
if (!empty($this->columnsCount)) {
$content .= '\\cols' . $this->columnsCount . ' ';
}
if (empty($this->columnsWidths)) {
if (!empty($this->spaceBetweenColumns)) {
$content .= '\\colsx' . round($this->spaceBetweenColumns * TWIPS_IN_CM) . ' ';
}
} else {
$width = 0;
foreach ($this->columnsWidths as $value) {
$width += $value * TWIPS_IN_CM;
}
$printableWidth = $this->rtf->paperWidth - $this->rtf->marginLeft - $this->rtf->marginRight;
$space = round(($printableWidth * TWIPS_IN_CM - $width) / (count($this->columnsWidths) - 1));
$i = 1;
foreach ($this->columnsWidths as $key => $value) {
$content .= '\\colno' . $i . '\\colw' . $value * TWIPS_IN_CM;
if (!empty($this->columnsWidths[$key])) {
$content .= '\\colsr' . $space;
}
$i++;
}
$content .= ' ';
}
if (!empty($this->lineBetweenColumns)) {
$content .= '\\linebetcol ';
}
/*---Page part---*/
if (isset($this->paperWidth)) {
$content .= '\\pgwsxn' . round($this->paperWidth * TWIPS_IN_CM) . ' ';
}
if (isset($this->paperHeight)) {
$content .= '\\pghsxn' . round($this->paperHeight * TWIPS_IN_CM) . ' ';
}
if (isset($this->marginLeft)) {
$content .= '\\marglsxn' . round($this->marginLeft * TWIPS_IN_CM) . ' ';
}
if (isset($this->marginRight)) {
$content .= '\\margrsxn' . round($this->marginRight * TWIPS_IN_CM) . ' ';
}
if (isset($this->marginTop)) {
$content .= '\\margtsxn' . round($this->marginTop * TWIPS_IN_CM) . ' ';
}
if (isset($this->marginBottom)) {
$content .= '\\margbsxn' . round($this->marginBottom * TWIPS_IN_CM) . ' ';
}
if (isset($this->gutter)) {
$content .= '\\guttersxn' . round($this->gutter * TWIPS_IN_CM) . ' ';
}
if (!empty($this->mirrorMargins)) {
$content .= '\\margmirsxn ';
}
//vertical alignment
if (!empty($this->alignment)) {
$content .= $this->alignment;
}
$content .= "\r\n" . parent::getContent() . "\r\n";
//.........这里部分代码省略.........