100 $this->horizontal =
null;
101 $this->vertical =
null;
102 $this->textRotation =
null;
114 return $this->parent->getSharedComponent()->getAlignment();
126 return [
'alignment' => $array];
149 if ($this->isSupervisor) {
153 if (isset($pStyles[
'horizontal'])) {
156 if (isset($pStyles[
'vertical'])) {
159 if (isset($pStyles[
'textRotation'])) {
162 if (isset($pStyles[
'wrapText'])) {
165 if (isset($pStyles[
'shrinkToFit'])) {
168 if (isset($pStyles[
'indent'])) {
171 if (isset($pStyles[
'readOrder'])) {
186 if ($this->isSupervisor) {
206 if ($this->isSupervisor) {
207 $styleArray = $this->
getStyleArray([
'horizontal' => $pValue]);
210 $this->horizontal = $pValue;
223 if ($this->isSupervisor) {
243 if ($this->isSupervisor) {
247 $this->vertical = $pValue;
260 if ($this->isSupervisor) {
277 if ($pValue == self::TEXTROTATION_STACK_EXCEL) {
282 if (($pValue >= -90 && $pValue <= 90) || $pValue == self::TEXTROTATION_STACK_PHPSPREADSHEET) {
283 if ($this->isSupervisor) {
284 $styleArray = $this->
getStyleArray([
'textRotation' => $pValue]);
287 $this->textRotation = $pValue;
290 throw new PhpSpreadsheetException(
'Text rotation should be a value between -90 and 90.');
303 if ($this->isSupervisor) {
322 if ($this->isSupervisor) {
326 $this->wrapText = $pValue;
339 if ($this->isSupervisor) {
358 if ($this->isSupervisor) {
359 $styleArray = $this->
getStyleArray([
'shrinkToFit' => $pValue]);
362 $this->shrinkToFit = $pValue;
375 if ($this->isSupervisor) {
401 if ($this->isSupervisor) {
405 $this->indent = $pValue;
418 if ($this->isSupervisor) {
434 if ($pValue < 0 || $pValue > 2) {
437 if ($this->isSupervisor) {
438 $styleArray = $this->
getStyleArray([
'readOrder' => $pValue]);
441 $this->readOrder = $pValue;
454 if ($this->isSupervisor) {
461 $this->textRotation .
462 ($this->wrapText ?
't' :
'f') .
463 ($this->shrinkToFit ?
't' :
'f') .
481 return $exportedArray;
An exception for terminatinating execution or to throw for unit testing.
const HORIZONTAL_CENTER_CONTINUOUS
setVertical($pValue)
Set Vertical.
getTextRotation()
Get TextRotation.
getStyleArray($array)
Build style array from subcomponents.
const TEXTROTATION_STACK_PHPSPREADSHEET
getHorizontal()
Get Horizontal.
setHorizontal($pValue)
Set Horizontal.
setTextRotation($pValue)
Set TextRotation.
const VERTICAL_DISTRIBUTED
const HORIZONTAL_DISTRIBUTED
applyFromArray(array $pStyles)
Apply styles from array.
setWrapText($pValue)
Set Wrap Text.
setIndent($pValue)
Set indent.
setReadOrder($pValue)
Set read order.
getWrapText()
Get Wrap Text.
getReadOrder()
Get read order.
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
const TEXTROTATION_STACK_EXCEL
getVertical()
Get Vertical.
getHashCode()
Get hash code.
setShrinkToFit($pValue)
Set Shrink to fit.
exportArray1()
Abstract method to be implemented in anything which extends this class.
getShrinkToFit()
Get Shrink to fit.
__construct($isSupervisor=false, $isConditional=false)
Create a new Alignment.
getActiveSheet()
Get the currently active sheet.
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.
exportArray2(array &$exportedArray, string $index, $objOrValue)
Populate array from exportArray1.