ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
PhpOffice\PhpSpreadsheet\Worksheet\PageMargins Class Reference
+ Collaboration diagram for PhpOffice\PhpSpreadsheet\Worksheet\PageMargins:

Public Member Functions

 __construct ()
 Create a new PageMargins. More...
 
 getLeft ()
 Get Left. More...
 
 setLeft ($pValue)
 Set Left. More...
 
 getRight ()
 Get Right. More...
 
 setRight ($pValue)
 Set Right. More...
 
 getTop ()
 Get Top. More...
 
 setTop ($pValue)
 Set Top. More...
 
 getBottom ()
 Get Bottom. More...
 
 setBottom ($pValue)
 Set Bottom. More...
 
 getHeader ()
 Get Header. More...
 
 setHeader ($pValue)
 Set Header. More...
 
 getFooter ()
 Get Footer. More...
 
 setFooter ($pValue)
 Set Footer. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 

Static Public Member Functions

static fromCentimeters (float $value)
 
static toCentimeters (float $value)
 
static fromMillimeters (float $value)
 
static toMillimeters (float $value)
 
static fromPoints (float $value)
 
static toPoints (float $value)
 

Private Attributes

 $left = 0.7
 
 $right = 0.7
 
 $top = 0.75
 
 $bottom = 0.75
 
 $header = 0.3
 
 $footer = 0.3
 

Detailed Description

Definition at line 5 of file PageMargins.php.

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::__construct ( )

Create a new PageMargins.

Definition at line 52 of file PageMargins.php.

53  {
54  }

Member Function Documentation

◆ __clone()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Definition at line 203 of file PageMargins.php.

References $key.

204  {
205  $vars = get_object_vars($this);
206  foreach ($vars as $key => $value) {
207  if (is_object($value)) {
208  $this->$key = clone $value;
209  } else {
210  $this->$key = $value;
211  }
212  }
213  }
$key
Definition: croninfo.php:18

◆ fromCentimeters()

static PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::fromCentimeters ( float  $value)
static

Definition at line 215 of file PageMargins.php.

215  : float
216  {
217  return $value / 2.54;
218  }

◆ fromMillimeters()

static PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::fromMillimeters ( float  $value)
static

Definition at line 225 of file PageMargins.php.

225  : float
226  {
227  return $value / 25.4;
228  }

◆ fromPoints()

static PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::fromPoints ( float  $value)
static

Definition at line 235 of file PageMargins.php.

235  : float
236  {
237  return $value / 72;
238  }

◆ getBottom()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::getBottom ( )

Get Bottom.

Returns
float

Definition at line 133 of file PageMargins.php.

References PhpOffice\PhpSpreadsheet\Worksheet\PageMargins\$bottom.

◆ getFooter()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::getFooter ( )

Get Footer.

Returns
float

Definition at line 181 of file PageMargins.php.

References PhpOffice\PhpSpreadsheet\Worksheet\PageMargins\$footer.

◆ getHeader()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::getHeader ( )

Get Header.

Returns
float

Definition at line 157 of file PageMargins.php.

References PhpOffice\PhpSpreadsheet\Worksheet\PageMargins\$header.

◆ getLeft()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::getLeft ( )

Get Left.

Returns
float

Definition at line 61 of file PageMargins.php.

References PhpOffice\PhpSpreadsheet\Worksheet\PageMargins\$left.

◆ getRight()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::getRight ( )

Get Right.

Returns
float

Definition at line 85 of file PageMargins.php.

References PhpOffice\PhpSpreadsheet\Worksheet\PageMargins\$right.

◆ getTop()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::getTop ( )

Get Top.

Returns
float

Definition at line 109 of file PageMargins.php.

References PhpOffice\PhpSpreadsheet\Worksheet\PageMargins\$top.

◆ setBottom()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::setBottom (   $pValue)

Set Bottom.

Parameters
float$pValue
Returns
$this

Definition at line 145 of file PageMargins.php.

146  {
147  $this->bottom = $pValue;
148 
149  return $this;
150  }

◆ setFooter()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::setFooter (   $pValue)

Set Footer.

Parameters
float$pValue
Returns
$this

Definition at line 193 of file PageMargins.php.

194  {
195  $this->footer = $pValue;
196 
197  return $this;
198  }

◆ setHeader()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::setHeader (   $pValue)

Set Header.

Parameters
float$pValue
Returns
$this

Definition at line 169 of file PageMargins.php.

170  {
171  $this->header = $pValue;
172 
173  return $this;
174  }

◆ setLeft()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::setLeft (   $pValue)

Set Left.

Parameters
float$pValue
Returns
$this

Definition at line 73 of file PageMargins.php.

References left.

74  {
75  $this->left = $pValue;
76 
77  return $this;
78  }
margin left
Definition: langcheck.php:164

◆ setRight()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::setRight (   $pValue)

Set Right.

Parameters
float$pValue
Returns
$this

Definition at line 97 of file PageMargins.php.

98  {
99  $this->right = $pValue;
100 
101  return $this;
102  }

◆ setTop()

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::setTop (   $pValue)

Set Top.

Parameters
float$pValue
Returns
$this

Definition at line 121 of file PageMargins.php.

122  {
123  $this->top = $pValue;
124 
125  return $this;
126  }

◆ toCentimeters()

static PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::toCentimeters ( float  $value)
static

Definition at line 220 of file PageMargins.php.

220  : float
221  {
222  return $value * 2.54;
223  }

◆ toMillimeters()

static PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::toMillimeters ( float  $value)
static

Definition at line 230 of file PageMargins.php.

230  : float
231  {
232  return $value * 25.4;
233  }

◆ toPoints()

static PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::toPoints ( float  $value)
static

Definition at line 240 of file PageMargins.php.

240  : float
241  {
242  return $value * 72;
243  }

Field Documentation

◆ $bottom

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::$bottom = 0.75
private

◆ $footer

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::$footer = 0.3
private

◆ $header

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::$header = 0.3
private

◆ $left

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::$left = 0.7
private

◆ $right

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::$right = 0.7
private

◆ $top

PhpOffice\PhpSpreadsheet\Worksheet\PageMargins::$top = 0.75
private

The documentation for this class was generated from the following file: