Section extends Border
Section settings
Table of Contents
- DEFAULT_COLUMN_COUNT = 1
- DEFAULT_COLUMN_SPACING = 720
- DEFAULT_FOOTER_HEIGHT = 720
- DEFAULT_GUTTER = 0
- DEFAULT_HEADER_HEIGHT = 720
- DEFAULT_HEIGHT = 16837.79527559
- DEFAULT_MARGIN = 1440
- DEFAULT_WIDTH = 11905.511811024
- Page default constants
- ORIENTATION_LANDSCAPE = 'landscape'
- ORIENTATION_PORTRAIT = 'portrait'
- Page orientation
- $aliases : array<string|int, mixed>
- Aliases
- $borderBottomColor : string
- Border Bottom Color
- $borderBottomSize : int|float
- Border Bottom Size
- $borderBottomStyle : string
- Border Bottom Style
- $borderLeftColor : string
- Border Left Color
- $borderLeftSize : int|float
- Border Left Size
- $borderLeftStyle : string
- Border Left Style
- $borderRightColor : string
- Border Right Color
- $borderRightSize : int|float
- Border Right Size
- $borderRightStyle : string
- Border Right Style
- $borderTopColor : string
- Border Top Color
- $borderTopSize : int|float
- Border Top Size
- $borderTopStyle : string
- Border Top Style
- $index : int|null
- Index number in Style collection for named style
- $styleName : string
- Style name
- $breakType : string
- Section break type
- $colsNum : int
- Section columns count
- $colsSpace : int|float
- Section spacing between columns
- $footerHeight : int|float
- Footer height
- $gutter : int|float
- Page gutter spacing
- $headerHeight : int|float
- Header height
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver)
- $lineNumbering : LineNumbering
- Line numbering
- $marginBottom : int|float
- Bottom margin spacing
- $marginLeft : int|float
- Left margin spacing
- $marginRight : int|float
- Right margin spacing
- $marginTop : int|float
- Top margin spacing
- $orientation : string
- Page Orientation
- $pageNumberingStart : int
- Page Numbering Start
- $pageSizeH : int|float
- Page Size Height
- $pageSizeW : int|float
- Page Size Width
- $paper : Paper
- Paper size
- $vAlign : string
- Vertical Text Alignment on Page One of \PhpOffice\PhpWord\SimpleType\VerticalJc
- __construct() : mixed
- Create new instance
- getBorderBottomColor() : string
- Get border bottom color
- getBorderBottomSize() : int|float
- Get border bottom size
- getBorderBottomStyle() : string
- Get border bottom style
- getBorderColor() : array<string|int, string>
- Get border color
- getBorderLeftColor() : string
- Get border left color
- getBorderLeftSize() : int|float
- Get border left size
- getBorderLeftStyle() : string
- Get border left style
- getBorderRightColor() : string
- Get border right color
- getBorderRightSize() : int|float
- Get border right size
- getBorderRightStyle() : string
- Get border right style
- getBorderSize() : array<string|int, int>
- Get border size
- getBorderStyle() : array<string|int, string>
- Get border style
- getBorderTopColor() : string
- Get border top color
- getBorderTopSize() : int|float
- Get border top size
- getBorderTopStyle() : string
- Get border top style
- getBreakType() : string
- Get Break Type
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
- getColsNum() : int
- Get Section Columns Count
- getColsSpace() : int|float
- Get Section Space Between Columns
- getFooterHeight() : int|float
- Get Footer Height
- getGutter() : int|float
- Get gutter
- getHeaderHeight() : int|float
- Get Header Height
- getIndex() : int|null
- Get index number
- getLineNumbering() : LineNumbering
- Get line numbering
- getMarginBottom() : int|float
- Get Margin Bottom
- getMarginLeft() : int|float
- Get Margin Left
- getMarginRight() : int|float
- Get Margin Right
- getMarginTop() : int|float
- Get Margin Top
- getOrientation() : string
- Get Page Orientation
- getPageNumberingStart() : null|int
- Get page numbering start
- getPageSizeH() : int|float|null
- Get Page Size Height
- getPageSizeW() : int|float|null
- Get Page Size Width
- getPaperSize() : string
- Get paper size
- getStyleName() : string
- Get style name
- getVAlign() : string
- Get vertical alignment
- hasBorder() : bool
- Check if any of the border is not null
- isAuto() : bool
- Get is automatic style flag
- setArrayStyle() : self
- Set style using associative array
- setAuto() : self
- Set is automatic style flag
- setBorderBottomColor() : self
- Set border bottom color
- setBorderBottomSize() : self
- Set border bottom size
- setBorderBottomStyle() : self
- Set border bottom style
- setBorderColor() : self
- Set border color
- setBorderLeftColor() : self
- Set border left color
- setBorderLeftSize() : self
- Set border left size
- setBorderLeftStyle() : self
- Set border left style
- setBorderRightColor() : self
- Set border right color
- setBorderRightSize() : self
- Set border right size
- setBorderRightStyle() : self
- Set border right style
- setBorderSize() : self
- Set border size
- setBorderStyle() : self
- Set border style
- setBorderTopColor() : self
- Set border top color
- setBorderTopSize() : self
- Set border top size
- setBorderTopStyle() : self
- Set border top Style
- setBreakType() : self
- Set Break Type
- setColsNum() : self
- Set Section Columns Count
- setColsSpace() : self
- Set Section Space Between Columns
- setFooterHeight() : self
- Set Footer Height
- setGutter() : self
- Set gutter
- setHeaderHeight() : self
- Set Header Height
- setIndex() : self
- Set index number
- setLandscape() : self
- Set Landscape Orientation
- setLineNumbering() : self
- Set line numbering
- setMarginBottom() : self
- Set Margin Bottom
- setMarginLeft() : self
- Set Margin Left
- setMarginRight() : self
- Set Margin Right
- setMarginTop() : self
- Set Margin Top
- setOrientation() : self
- Set orientation
- setPageNumberingStart() : self
- Set page numbering start
- setPageSizeH() : Section
- setPageSizeW() : Section
- setPaperSize() : self
- Set paper size
- setPortrait() : self
- Set Portrait Orientation
- setSettingValue() : self
- Set Setting Value
- setStyleByArray() : self
- Set style by using associative array
- setStyleName() : self
- Set style name
- setStyleValue() : self
- Set style value template method
- setVAlign() : self
- Set vertical alignment
- setBoolVal() : bool
- Set bool value
- setEnumVal() : mixed
- Set enum value
- setFloatVal() : float|null
- Set float value: Convert string that contains only numeric into float
- setIntVal() : int|null
- Set integer value: Convert string that contains only numeric into integer
- setNonEmptyVal() : string
- Set default for null and empty value
- setNumericVal() : int|float|null
- Set numeric value
- setObjectVal() : mixed
- Set object value
- setPairedVal() : self
- Set $property value and set $pairProperty = false when $value = true
Constants
DEFAULT_COLUMN_COUNT
public
mixed
DEFAULT_COLUMN_COUNT
= 1
DEFAULT_COLUMN_SPACING
public
mixed
DEFAULT_COLUMN_SPACING
= 720
DEFAULT_FOOTER_HEIGHT
public
mixed
DEFAULT_FOOTER_HEIGHT
= 720
DEFAULT_GUTTER
public
mixed
DEFAULT_GUTTER
= ""
DEFAULT_HEADER_HEIGHT
public
mixed
DEFAULT_HEADER_HEIGHT
= 720
DEFAULT_HEIGHT
public
mixed
DEFAULT_HEIGHT
= 16837.79527559
DEFAULT_MARGIN
public
mixed
DEFAULT_MARGIN
= 1440
DEFAULT_WIDTH
Page default constants
public
mixed
DEFAULT_WIDTH
= 11905.511811024
Tags
ORIENTATION_LANDSCAPE
public
mixed
ORIENTATION_LANDSCAPE
= 'landscape'
ORIENTATION_PORTRAIT
Page orientation
public
mixed
ORIENTATION_PORTRAIT
= 'portrait'
Tags
Properties
$aliases
Aliases
protected
array<string|int, mixed>
$aliases
= array()
$borderBottomColor
Border Bottom Color
protected
string
$borderBottomColor
$borderBottomSize
Border Bottom Size
protected
int|float
$borderBottomSize
$borderBottomStyle
Border Bottom Style
protected
string
$borderBottomStyle
$borderLeftColor
Border Left Color
protected
string
$borderLeftColor
$borderLeftSize
Border Left Size
protected
int|float
$borderLeftSize
$borderLeftStyle
Border Left Style
protected
string
$borderLeftStyle
$borderRightColor
Border Right Color
protected
string
$borderRightColor
$borderRightSize
Border Right Size
protected
int|float
$borderRightSize
$borderRightStyle
Border Right Style
protected
string
$borderRightStyle
$borderTopColor
Border Top Color
protected
string
$borderTopColor
$borderTopSize
Border Top Size
protected
int|float
$borderTopSize
$borderTopStyle
Border Top Style
protected
string
$borderTopStyle
$index
Index number in Style collection for named style
protected
int|null
$index
This number starts from one and defined in Style::setStyleValues()
$styleName
Style name
protected
string
$styleName
$breakType
Section break type
private
string
$breakType
Options:
- nextPage: Next page section break
- nextColumn: Column section break
- continuous: Continuous section break
- evenPage: Even page section break
- oddPage: Odd page section break
$colsNum
Section columns count
private
int
$colsNum
= self::DEFAULT_COLUMN_COUNT
$colsSpace
Section spacing between columns
private
int|float
$colsSpace
= self::DEFAULT_COLUMN_SPACING
$footerHeight
Footer height
private
int|float
$footerHeight
= self::DEFAULT_FOOTER_HEIGHT
$gutter
Page gutter spacing
private
int|float
$gutter
= self::DEFAULT_GUTTER
Tags
$headerHeight
Header height
private
int|float
$headerHeight
= self::DEFAULT_HEADER_HEIGHT
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver)
private
bool
$isAuto
= false
Tags
$lineNumbering
Line numbering
private
LineNumbering
$lineNumbering
Tags
$marginBottom
Bottom margin spacing
private
int|float
$marginBottom
= self::DEFAULT_MARGIN
$marginLeft
Left margin spacing
private
int|float
$marginLeft
= self::DEFAULT_MARGIN
$marginRight
Right margin spacing
private
int|float
$marginRight
= self::DEFAULT_MARGIN
$marginTop
Top margin spacing
private
int|float
$marginTop
= self::DEFAULT_MARGIN
$orientation
Page Orientation
private
string
$orientation
= self::ORIENTATION_PORTRAIT
Tags
$pageNumberingStart
Page Numbering Start
private
int
$pageNumberingStart
$pageSizeH
Page Size Height
private
int|float
$pageSizeH
= self::DEFAULT_HEIGHT
$pageSizeW
Page Size Width
private
int|float
$pageSizeW
= self::DEFAULT_WIDTH
$paper
Paper size
private
Paper
$paper
$vAlign
Vertical Text Alignment on Page One of \PhpOffice\PhpWord\SimpleType\VerticalJc
private
string
$vAlign
Methods
__construct()
Create new instance
public
__construct() : mixed
Return values
mixed —getBorderBottomColor()
Get border bottom color
public
getBorderBottomColor() : string
Return values
string —getBorderBottomSize()
Get border bottom size
public
getBorderBottomSize() : int|float
Return values
int|float —getBorderBottomStyle()
Get border bottom style
public
getBorderBottomStyle() : string
Return values
string —getBorderColor()
Get border color
public
getBorderColor() : array<string|int, string>
Return values
array<string|int, string> —getBorderLeftColor()
Get border left color
public
getBorderLeftColor() : string
Return values
string —getBorderLeftSize()
Get border left size
public
getBorderLeftSize() : int|float
Return values
int|float —getBorderLeftStyle()
Get border left style
public
getBorderLeftStyle() : string
Return values
string —getBorderRightColor()
Get border right color
public
getBorderRightColor() : string
Return values
string —getBorderRightSize()
Get border right size
public
getBorderRightSize() : int|float
Return values
int|float —getBorderRightStyle()
Get border right style
public
getBorderRightStyle() : string
Return values
string —getBorderSize()
Get border size
public
getBorderSize() : array<string|int, int>
Return values
array<string|int, int> —getBorderStyle()
Get border style
public
getBorderStyle() : array<string|int, string>
Return values
array<string|int, string> —getBorderTopColor()
Get border top color
public
getBorderTopColor() : string
Return values
string —getBorderTopSize()
Get border top size
public
getBorderTopSize() : int|float
Return values
int|float —getBorderTopStyle()
Get border top style
public
getBorderTopStyle() : string
Return values
string —getBreakType()
Get Break Type
public
getBreakType() : string
Return values
string —getChildStyleValue()
Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
public
getChildStyleValue(AbstractStyle $substyleObject, string $substyleProperty) : mixed
Parameters
- $substyleObject : AbstractStyle
- $substyleProperty : string
Tags
Return values
mixed —getColsNum()
Get Section Columns Count
public
getColsNum() : int
Return values
int —getColsSpace()
Get Section Space Between Columns
public
getColsSpace() : int|float
Return values
int|float —getFooterHeight()
Get Footer Height
public
getFooterHeight() : int|float
Return values
int|float —getGutter()
Get gutter
public
getGutter() : int|float
Return values
int|float —getHeaderHeight()
Get Header Height
public
getHeaderHeight() : int|float
Return values
int|float —getIndex()
Get index number
public
getIndex() : int|null
Return values
int|null —getLineNumbering()
Get line numbering
public
getLineNumbering() : LineNumbering
Return values
LineNumbering —getMarginBottom()
Get Margin Bottom
public
getMarginBottom() : int|float
Return values
int|float —getMarginLeft()
Get Margin Left
public
getMarginLeft() : int|float
Return values
int|float —getMarginRight()
Get Margin Right
public
getMarginRight() : int|float
Return values
int|float —getMarginTop()
Get Margin Top
public
getMarginTop() : int|float
Return values
int|float —getOrientation()
Get Page Orientation
public
getOrientation() : string
Return values
string —getPageNumberingStart()
Get page numbering start
public
getPageNumberingStart() : null|int
Return values
null|int —getPageSizeH()
Get Page Size Height
public
getPageSizeH() : int|float|null
Tags
Return values
int|float|null —getPageSizeW()
Get Page Size Width
public
getPageSizeW() : int|float|null
Tags
Return values
int|float|null —getPaperSize()
Get paper size
public
getPaperSize() : string
Return values
string —getStyleName()
Get style name
public
getStyleName() : string
Return values
string —getVAlign()
Get vertical alignment
public
getVAlign() : string
Return values
string —hasBorder()
Check if any of the border is not null
public
hasBorder() : bool
Return values
bool —isAuto()
Get is automatic style flag
public
isAuto() : bool
Return values
bool —setArrayStyle()
Set style using associative array
public
setArrayStyle([array<string|int, mixed> $style = array() ]) : self
Parameters
- $style : array<string|int, mixed> = array()
Tags
Return values
self —setAuto()
Set is automatic style flag
public
setAuto([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
self —setBorderBottomColor()
Set border bottom color
public
setBorderBottomColor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderBottomSize()
Set border bottom size
public
setBorderBottomSize([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setBorderBottomStyle()
Set border bottom style
public
setBorderBottomStyle([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderColor()
Set border color
public
setBorderColor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderLeftColor()
Set border left color
public
setBorderLeftColor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderLeftSize()
Set border left size
public
setBorderLeftSize([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setBorderLeftStyle()
Set border left style
public
setBorderLeftStyle([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderRightColor()
Set border right color
public
setBorderRightColor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderRightSize()
Set border right size
public
setBorderRightSize([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setBorderRightStyle()
Set border right style
public
setBorderRightStyle([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderSize()
Set border size
public
setBorderSize([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setBorderStyle()
Set border style
public
setBorderStyle([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderTopColor()
Set border top color
public
setBorderTopColor([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBorderTopSize()
Set border top size
public
setBorderTopSize([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setBorderTopStyle()
Set border top Style
public
setBorderTopStyle([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBreakType()
Set Break Type
public
setBreakType([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setColsNum()
Set Section Columns Count
public
setColsNum([int $value = null ]) : self
Parameters
- $value : int = null
Return values
self —setColsSpace()
Set Section Space Between Columns
public
setColsSpace([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setFooterHeight()
Set Footer Height
public
setFooterHeight([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setGutter()
Set gutter
public
setGutter([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setHeaderHeight()
Set Header Height
public
setHeaderHeight([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setIndex()
Set index number
public
setIndex([int|null $value = null ]) : self
Parameters
- $value : int|null = null
Return values
self —setLandscape()
Set Landscape Orientation
public
setLandscape() : self
Return values
self —setLineNumbering()
Set line numbering
public
setLineNumbering([mixed $value = null ]) : self
Parameters
- $value : mixed = null
Return values
self —setMarginBottom()
Set Margin Bottom
public
setMarginBottom([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setMarginLeft()
Set Margin Left
public
setMarginLeft([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setMarginRight()
Set Margin Right
public
setMarginRight([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setMarginTop()
Set Margin Top
public
setMarginTop([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setOrientation()
Set orientation
public
setOrientation([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setPageNumberingStart()
Set page numbering start
public
setPageNumberingStart([null|int $pageNumberingStart = null ]) : self
Parameters
- $pageNumberingStart : null|int = null
Return values
self —setPageSizeH()
public
setPageSizeH([int|float|null $value = null ]) : Section
Parameters
- $value : int|float|null = null
Tags
Return values
Section —setPageSizeW()
public
setPageSizeW([int|float|null $value = null ]) : Section
Parameters
- $value : int|float|null = null
Tags
Return values
Section —setPaperSize()
Set paper size
public
setPaperSize([string $value = '' ]) : self
Parameters
- $value : string = ''
Return values
self —setPortrait()
Set Portrait Orientation
public
setPortrait() : self
Return values
self —setSettingValue()
Set Setting Value
public
setSettingValue(string $key, string $value) : self
Parameters
- $key : string
- $value : string
Return values
self —setStyleByArray()
Set style by using associative array
public
setStyleByArray([array<string|int, mixed> $values = array() ]) : self
Parameters
- $values : array<string|int, mixed> = array()
Return values
self —setStyleName()
Set style name
public
setStyleName(string $value) : self
Parameters
- $value : string
Return values
self —setStyleValue()
Set style value template method
public
setStyleValue(string $key, string $value) : self
Some child classes have their own specific overrides. Backward compability check for versions < 0.10.0 which use underscore prefix for their private properties. Check if the set method is exists. Throws an exception?
Parameters
- $key : string
- $value : string
Return values
self —setVAlign()
Set vertical alignment
public
setVAlign([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setBoolVal()
Set bool value
protected
setBoolVal(bool $value, bool $default) : bool
Parameters
- $value : bool
- $default : bool
Return values
bool —setEnumVal()
Set enum value
protected
setEnumVal([mixed $value = null ][, array<string|int, mixed> $enum = array() ][, mixed $default = null ]) : mixed
Parameters
- $value : mixed = null
- $enum : array<string|int, mixed> = array()
- $default : mixed = null
Tags
Return values
mixed —setFloatVal()
Set float value: Convert string that contains only numeric into float
protected
setFloatVal(mixed $value[, float|null $default = null ]) : float|null
Parameters
- $value : mixed
- $default : float|null = null
Return values
float|null —setIntVal()
Set integer value: Convert string that contains only numeric into integer
protected
setIntVal(int|null $value[, int|null $default = null ]) : int|null
Parameters
- $value : int|null
- $default : int|null = null
Return values
int|null —setNonEmptyVal()
Set default for null and empty value
protected
setNonEmptyVal(string $value, string $default) : string
Parameters
- $value : string
-
(was: mixed)
- $default : string
-
(was: mixed)
Return values
string —(was: mixed)
setNumericVal()
Set numeric value
protected
setNumericVal(mixed $value[, int|float|null $default = null ]) : int|float|null
Parameters
- $value : mixed
- $default : int|float|null = null
Return values
int|float|null —setObjectVal()
Set object value
protected
setObjectVal(mixed $value, string $styleName, mixed &$style) : mixed
Parameters
- $value : mixed
- $styleName : string
- $style : mixed
Return values
mixed —setPairedVal()
Set $property value and set $pairProperty = false when $value = true
protected
setPairedVal(bool &$property, bool &$pairProperty, bool $value) : self
Parameters
- $property : bool
- $pairProperty : bool
- $value : bool