ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
CellAlignment.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Reader\Xls\Style
;
4
5
use
PhpOffice\PhpSpreadsheet\Style\Alignment
;
6
7
class
CellAlignment
8
{
12
protected
static
$horizontalAlignmentMap
= [
13
0 =>
Alignment::HORIZONTAL_GENERAL
,
14
1 =>
Alignment::HORIZONTAL_LEFT
,
15
2 =>
Alignment::HORIZONTAL_CENTER
,
16
3 =>
Alignment::HORIZONTAL_RIGHT
,
17
4 =>
Alignment::HORIZONTAL_FILL
,
18
5 =>
Alignment::HORIZONTAL_JUSTIFY
,
19
6 =>
Alignment::HORIZONTAL_CENTER_CONTINUOUS
,
20
];
21
25
protected
static
$verticalAlignmentMap
= [
26
0 =>
Alignment::VERTICAL_TOP
,
27
1 =>
Alignment::VERTICAL_CENTER
,
28
2 =>
Alignment::VERTICAL_BOTTOM
,
29
3 =>
Alignment::VERTICAL_JUSTIFY
,
30
];
31
32
public
static
function
horizontal
(
Alignment
$alignment,
int
$horizontal): void
33
{
34
if
(array_key_exists($horizontal, self::$horizontalAlignmentMap)) {
35
$alignment->
setHorizontal
(self::$horizontalAlignmentMap[$horizontal]);
36
}
37
}
38
39
public
static
function
vertical
(
Alignment
$alignment,
int
$vertical): void
40
{
41
if
(array_key_exists($vertical, self::$verticalAlignmentMap)) {
42
$alignment->
setVertical
(self::$verticalAlignmentMap[$vertical]);
43
}
44
}
45
46
public
static
function
wrap
(
Alignment
$alignment,
int
$wrap): void
47
{
48
$alignment->
setWrapText
((
bool
) $wrap);
49
}
50
}
PhpOffice\PhpSpreadsheet\Reader\Xls\Style\CellAlignment
Definition:
CellAlignment.php:7
PhpOffice\PhpSpreadsheet\Style\Alignment\VERTICAL_BOTTOM
const VERTICAL_BOTTOM
Definition:
Alignment.php:20
PhpOffice\PhpSpreadsheet\Style\Alignment
Definition:
Alignment.php:7
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_CENTER_CONTINUOUS
const HORIZONTAL_CENTER_CONTINUOUS
Definition:
Alignment.php:14
PhpOffice\PhpSpreadsheet\Style\Alignment\VERTICAL_CENTER
const VERTICAL_CENTER
Definition:
Alignment.php:22
PhpOffice\PhpSpreadsheet\Reader\Xls\Style\CellAlignment\horizontal
static static horizontal(Alignment $alignment, int $horizontal)
Definition:
CellAlignment.php:32
PhpOffice\PhpSpreadsheet\Style\Alignment\VERTICAL_TOP
const VERTICAL_TOP
Definition:
Alignment.php:21
PhpOffice\PhpSpreadsheet\Style\Alignment\VERTICAL_JUSTIFY
const VERTICAL_JUSTIFY
Definition:
Alignment.php:23
Alignment
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_CENTER
const HORIZONTAL_CENTER
Definition:
Alignment.php:13
PhpOffice\PhpSpreadsheet\Style\Alignment\setWrapText
setWrapText($pValue)
Set Wrap Text.
Definition:
Alignment.php:317
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_LEFT
const HORIZONTAL_LEFT
Definition:
Alignment.php:11
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_JUSTIFY
const HORIZONTAL_JUSTIFY
Definition:
Alignment.php:15
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_FILL
const HORIZONTAL_FILL
Definition:
Alignment.php:16
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_GENERAL
const HORIZONTAL_GENERAL
Definition:
Alignment.php:10
PhpOffice\PhpSpreadsheet\Reader\Xls\Style\CellAlignment\vertical
static vertical(Alignment $alignment, int $vertical)
Definition:
CellAlignment.php:39
PhpOffice\PhpSpreadsheet\Reader\Xls\Style\CellAlignment\$horizontalAlignmentMap
static $horizontalAlignmentMap
Definition:
CellAlignment.php:12
php
PhpOffice\PhpSpreadsheet\Reader\Xls\Style\CellAlignment\wrap
static wrap(Alignment $alignment, int $wrap)
Definition:
CellAlignment.php:46
PhpOffice\PhpSpreadsheet\Style\Alignment\setVertical
setVertical($pValue)
Set Vertical.
Definition:
Alignment.php:237
PhpOffice\PhpSpreadsheet\Style\Alignment\HORIZONTAL_RIGHT
const HORIZONTAL_RIGHT
Definition:
Alignment.php:12
PhpOffice\PhpSpreadsheet\Reader\Xls\Style\CellAlignment\$verticalAlignmentMap
static $verticalAlignmentMap
Definition:
CellAlignment.php:25
PhpOffice\PhpSpreadsheet\Reader\Xls\Style
Definition:
Border.php:3
PhpOffice\PhpSpreadsheet\Style\Alignment\setHorizontal
setHorizontal($pValue)
Set Horizontal.
Definition:
Alignment.php:200
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Reader
Xls
Style
CellAlignment.php
Generated on Thu Feb 27 2025 19:01:24 for ILIAS by
1.8.13 (using
Doxyfile
)