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

Public Member Functions

 __construct ($isSupervisor=false)
 Create a new Supervisor. More...
 
 bindParent ($parent, $parentPropertyName=null)
 Bind parent. More...
 
 getIsSupervisor ()
 Is this a supervisor or a cell style component? More...
 
 getActiveSheet ()
 Get the currently active sheet. More...
 
 getSelectedCells ()
 Get the currently active cell coordinate in currently active sheet. More...
 
 getActiveCell ()
 Get the currently active cell coordinate in currently active sheet. More...
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy. More...
 
 exportArray ()
 Export style as array. More...
 
- Public Member Functions inherited from PhpOffice\PhpSpreadsheet\IComparable
 getHashCode ()
 Get hash code. More...
 

Protected Member Functions

 exportArray1 ()
 Abstract method to be implemented in anything which extends this class. More...
 
 exportArray2 (array &$exportedArray, string $index, $objOrValue)
 Populate array from exportArray1. More...
 

Protected Attributes

 $isSupervisor
 
 $parent
 
 $parentPropertyName
 

Detailed Description

Definition at line 9 of file Supervisor.php.

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\Style\Supervisor::__construct (   $isSupervisor = false)

Create a new Supervisor.

Parameters
bool$isSupervisorFlag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are

Definition at line 39 of file Supervisor.php.

References PhpOffice\PhpSpreadsheet\Style\Supervisor\$isSupervisor.

40  {
41  // Supervisor?
42  $this->isSupervisor = $isSupervisor;
43  }

Member Function Documentation

◆ __clone()

PhpOffice\PhpSpreadsheet\Style\Supervisor::__clone ( )

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

Definition at line 106 of file Supervisor.php.

References $key.

107  {
108  $vars = get_object_vars($this);
109  foreach ($vars as $key => $value) {
110  if ((is_object($value)) && ($key != 'parent')) {
111  $this->$key = clone $value;
112  } else {
113  $this->$key = $value;
114  }
115  }
116  }
$key
Definition: croninfo.php:18

◆ bindParent()

PhpOffice\PhpSpreadsheet\Style\Supervisor::bindParent (   $parent,
  $parentPropertyName = null 
)

Bind parent.

Only used for supervisor.

Parameters
Spreadsheet | Style$parent
null | string$parentPropertyName
Returns
$this

Definition at line 53 of file Supervisor.php.

References PhpOffice\PhpSpreadsheet\Style\Supervisor\$parent, and PhpOffice\PhpSpreadsheet\Style\Supervisor\$parentPropertyName.

54  {
55  $this->parent = $parent;
56  $this->parentPropertyName = $parentPropertyName;
57 
58  return $this;
59  }

◆ exportArray()

PhpOffice\PhpSpreadsheet\Style\Supervisor::exportArray ( )
final

Export style as array.

Available to anything which extends this class: Alignment, Border, Borders, Color, Fill, Font, NumberFormat, Protection, and Style.

Definition at line 125 of file Supervisor.php.

References PhpOffice\PhpSpreadsheet\Style\Supervisor\exportArray1().

125  : array
126  {
127  return $this->exportArray1();
128  }
exportArray1()
Abstract method to be implemented in anything which extends this class.
+ Here is the call graph for this function:

◆ exportArray1()

PhpOffice\PhpSpreadsheet\Style\Supervisor::exportArray1 ( )
abstractprotected

Abstract method to be implemented in anything which extends this class.

This method invokes exportArray2 with the names and values of all properties to be included in output array, returning that array to exportArray, then to caller.

Referenced by PhpOffice\PhpSpreadsheet\Style\Supervisor\exportArray().

+ Here is the caller graph for this function:

◆ exportArray2()

PhpOffice\PhpSpreadsheet\Style\Supervisor::exportArray2 ( array &  $exportedArray,
string  $index,
  $objOrValue 
)
finalprotected

Populate array from exportArray1.

This method is available to anything which extends this class. The parameter index is the key to be added to the array. The parameter objOrValue is either a primitive type, which is the value added to the array, or a Style object to be recursively added via exportArray.

Parameters
mixed$objOrValue

Definition at line 150 of file Supervisor.php.

References PhpOffice\PhpSpreadsheet\Style\Style\$index.

Referenced by PhpOffice\PhpSpreadsheet\Style\Protection\exportArray1(), PhpOffice\PhpSpreadsheet\Style\Border\exportArray1(), PhpOffice\PhpSpreadsheet\Style\Fill\exportArray1(), PhpOffice\PhpSpreadsheet\Style\Color\exportArray1(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\exportArray1(), PhpOffice\PhpSpreadsheet\Style\Borders\exportArray1(), PhpOffice\PhpSpreadsheet\Style\Alignment\exportArray1(), PhpOffice\PhpSpreadsheet\Style\Font\exportArray1(), and PhpOffice\PhpSpreadsheet\Style\Style\exportArray1().

150  : void
151  {
152  if ($objOrValue instanceof self) {
153  $exportedArray[$index] = $objOrValue->exportArray();
154  } else {
155  $exportedArray[$index] = $objOrValue;
156  }
157  }
+ Here is the caller graph for this function:

◆ getActiveCell()

PhpOffice\PhpSpreadsheet\Style\Supervisor::getActiveCell ( )

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor.

Returns
string E.g. 'A1'

Definition at line 98 of file Supervisor.php.

References PhpOffice\PhpSpreadsheet\Style\Supervisor\getActiveSheet().

Referenced by PhpOffice\PhpSpreadsheet\Style\Style\getConditionalStyles(), and PhpOffice\PhpSpreadsheet\Style\Style\getSharedComponent().

99  {
100  return $this->getActiveSheet()->getActiveCell();
101  }
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveSheet()

PhpOffice\PhpSpreadsheet\Style\Supervisor::getActiveSheet ( )

Get the currently active sheet.

Only used for supervisor.

Returns
Worksheet

Definition at line 76 of file Supervisor.php.

Referenced by PhpOffice\PhpSpreadsheet\Style\Protection\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Color\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Border\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Fill\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Alignment\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Font\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Style\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Borders\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Supervisor\getActiveCell(), PhpOffice\PhpSpreadsheet\Style\Style\getConditionalStyles(), PhpOffice\PhpSpreadsheet\Style\Style\getOldXfIndexes(), PhpOffice\PhpSpreadsheet\Style\Supervisor\getSelectedCells(), PhpOffice\PhpSpreadsheet\Style\Style\getSharedComponent(), PhpOffice\PhpSpreadsheet\Style\Color\setARGB(), PhpOffice\PhpSpreadsheet\Style\Font\setBold(), PhpOffice\PhpSpreadsheet\Style\Border\setBorderStyle(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\setBuiltInFormatCode(), PhpOffice\PhpSpreadsheet\Style\Border\setColor(), PhpOffice\PhpSpreadsheet\Style\Font\setColor(), PhpOffice\PhpSpreadsheet\Style\Style\setConditionalStyles(), PhpOffice\PhpSpreadsheet\Style\Borders\setDiagonalDirection(), PhpOffice\PhpSpreadsheet\Style\Fill\setEndColor(), PhpOffice\PhpSpreadsheet\Style\Fill\setFillType(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\setFormatCode(), PhpOffice\PhpSpreadsheet\Style\Protection\setHidden(), PhpOffice\PhpSpreadsheet\Style\Alignment\setHorizontal(), PhpOffice\PhpSpreadsheet\Style\Alignment\setIndent(), PhpOffice\PhpSpreadsheet\Style\Font\setItalic(), PhpOffice\PhpSpreadsheet\Style\Protection\setLocked(), PhpOffice\PhpSpreadsheet\Style\Font\setName(), PhpOffice\PhpSpreadsheet\Style\Style\setQuotePrefix(), PhpOffice\PhpSpreadsheet\Style\Alignment\setReadOrder(), PhpOffice\PhpSpreadsheet\Style\Color\setRGB(), PhpOffice\PhpSpreadsheet\Style\Fill\setRotation(), PhpOffice\PhpSpreadsheet\Style\Alignment\setShrinkToFit(), PhpOffice\PhpSpreadsheet\Style\Font\setSize(), PhpOffice\PhpSpreadsheet\Style\Fill\setStartColor(), PhpOffice\PhpSpreadsheet\Style\Font\setStrikethrough(), PhpOffice\PhpSpreadsheet\Style\Font\setSubscript(), PhpOffice\PhpSpreadsheet\Style\Font\setSuperscript(), PhpOffice\PhpSpreadsheet\Style\Alignment\setTextRotation(), PhpOffice\PhpSpreadsheet\Style\Font\setUnderline(), PhpOffice\PhpSpreadsheet\Style\Alignment\setVertical(), and PhpOffice\PhpSpreadsheet\Style\Alignment\setWrapText().

77  {
78  return $this->parent->getActiveSheet();
79  }
+ Here is the caller graph for this function:

◆ getIsSupervisor()

PhpOffice\PhpSpreadsheet\Style\Supervisor::getIsSupervisor ( )

◆ getSelectedCells()

PhpOffice\PhpSpreadsheet\Style\Supervisor::getSelectedCells ( )

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor.

Returns
string E.g. 'A1'

Definition at line 87 of file Supervisor.php.

References PhpOffice\PhpSpreadsheet\Style\Supervisor\getActiveSheet().

Referenced by PhpOffice\PhpSpreadsheet\Style\Protection\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Color\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Border\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Fill\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Alignment\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Font\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Style\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Borders\applyFromArray(), PhpOffice\PhpSpreadsheet\Style\Color\setARGB(), PhpOffice\PhpSpreadsheet\Style\Font\setBold(), PhpOffice\PhpSpreadsheet\Style\Border\setBorderStyle(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\setBuiltInFormatCode(), PhpOffice\PhpSpreadsheet\Style\Border\setColor(), PhpOffice\PhpSpreadsheet\Style\Font\setColor(), PhpOffice\PhpSpreadsheet\Style\Style\setConditionalStyles(), PhpOffice\PhpSpreadsheet\Style\Borders\setDiagonalDirection(), PhpOffice\PhpSpreadsheet\Style\Fill\setEndColor(), PhpOffice\PhpSpreadsheet\Style\Fill\setFillType(), PhpOffice\PhpSpreadsheet\Style\NumberFormat\setFormatCode(), PhpOffice\PhpSpreadsheet\Style\Protection\setHidden(), PhpOffice\PhpSpreadsheet\Style\Alignment\setHorizontal(), PhpOffice\PhpSpreadsheet\Style\Alignment\setIndent(), PhpOffice\PhpSpreadsheet\Style\Font\setItalic(), PhpOffice\PhpSpreadsheet\Style\Protection\setLocked(), PhpOffice\PhpSpreadsheet\Style\Font\setName(), PhpOffice\PhpSpreadsheet\Style\Style\setQuotePrefix(), PhpOffice\PhpSpreadsheet\Style\Alignment\setReadOrder(), PhpOffice\PhpSpreadsheet\Style\Color\setRGB(), PhpOffice\PhpSpreadsheet\Style\Fill\setRotation(), PhpOffice\PhpSpreadsheet\Style\Alignment\setShrinkToFit(), PhpOffice\PhpSpreadsheet\Style\Font\setSize(), PhpOffice\PhpSpreadsheet\Style\Fill\setStartColor(), PhpOffice\PhpSpreadsheet\Style\Font\setStrikethrough(), PhpOffice\PhpSpreadsheet\Style\Font\setSubscript(), PhpOffice\PhpSpreadsheet\Style\Font\setSuperscript(), PhpOffice\PhpSpreadsheet\Style\Alignment\setTextRotation(), PhpOffice\PhpSpreadsheet\Style\Font\setUnderline(), PhpOffice\PhpSpreadsheet\Style\Alignment\setVertical(), and PhpOffice\PhpSpreadsheet\Style\Alignment\setWrapText().

88  {
89  return $this->getActiveSheet()->getSelectedCells();
90  }
getActiveSheet()
Get the currently active sheet.
Definition: Supervisor.php:76
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $isSupervisor

◆ $parent

PhpOffice\PhpSpreadsheet\Style\Supervisor::$parent
protected

◆ $parentPropertyName

PhpOffice\PhpSpreadsheet\Style\Supervisor::$parentPropertyName
protected

Definition at line 30 of file Supervisor.php.

Referenced by PhpOffice\PhpSpreadsheet\Style\Supervisor\bindParent().


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