119 public function __construct($isSupervisor = FALSE, $isConditional = FALSE)
122 parent::__construct($isSupervisor);
124 if ($isConditional) {
125 $this->_horizontal = NULL;
126 $this->_vertical = NULL;
127 $this->_textRotation = NULL;
139 return $this->_parent->getSharedComponent()->getAlignment();
150 return array(
'alignment' => $array);
172 if (is_array($pStyles)) {
173 if ($this->_isSupervisor) {
177 if (isset($pStyles[
'horizontal'])) {
180 if (isset($pStyles[
'vertical'])) {
183 if (isset($pStyles[
'rotation'])) {
186 if (isset($pStyles[
'wrap'])) {
189 if (isset($pStyles[
'shrinkToFit'])) {
192 if (isset($pStyles[
'indent'])) {
195 if (isset($pStyles[
'readorder'])) {
211 if ($this->_isSupervisor) {
228 if ($this->_isSupervisor) {
229 $styleArray = $this->
getStyleArray(array(
'horizontal' => $pValue));
233 $this->_horizontal = $pValue;
244 if ($this->_isSupervisor) {
261 if ($this->_isSupervisor) {
262 $styleArray = $this->
getStyleArray(array(
'vertical' => $pValue));
265 $this->_vertical = $pValue;
276 if ($this->_isSupervisor) {
291 if ($pValue == 255) {
296 if ( ($pValue >= -90 && $pValue <= 90) || $pValue == -165 ) {
297 if ($this->_isSupervisor) {
298 $styleArray = $this->
getStyleArray(array(
'rotation' => $pValue));
301 $this->_textRotation = $pValue;
316 if ($this->_isSupervisor) {
332 if ($this->_isSupervisor) {
333 $styleArray = $this->
getStyleArray(array(
'wrap' => $pValue));
336 $this->_wrapText = $pValue;
347 if ($this->_isSupervisor) {
363 if ($this->_isSupervisor) {
364 $styleArray = $this->
getStyleArray(array(
'shrinkToFit' => $pValue));
367 $this->_shrinkToFit = $pValue;
378 if ($this->_isSupervisor) {
398 if ($this->_isSupervisor) {
399 $styleArray = $this->
getStyleArray(array(
'indent' => $pValue));
402 $this->_indent = $pValue;
413 if ($this->_isSupervisor) {
426 if ($pValue < 0 || $pValue > 2) {
429 if ($this->_isSupervisor) {
430 $styleArray = $this->
getStyleArray(array(
'readorder' => $pValue));
433 $this->_readorder = $pValue;
444 if ($this->_isSupervisor) {
450 . $this->_textRotation
451 . ($this->_wrapText ?
't' :
'f')
452 . ($this->_shrinkToFit ?
't' :
'f')
An exception for terminatinating execution or to throw for unit testing.
setWrapText($pValue=FALSE)
Set Wrap Text.
getHorizontal()
Get Horizontal.
setVertical($pValue=PHPExcel_Style_Alignment::VERTICAL_BOTTOM)
Set Vertical.
setReadorder($pValue=0)
Set read order.
getShrinkToFit()
Get Shrink to fit.
__construct($isSupervisor=FALSE, $isConditional=FALSE)
Create a new PHPExcel_Style_Alignment.
setIndent($pValue=0)
Set indent.
getStyleArray($array)
Build style array from subcomponents.
const VERTICAL_DISTRIBUTED
setHorizontal($pValue=PHPExcel_Style_Alignment::HORIZONTAL_GENERAL)
Set Horizontal.
setShrinkToFit($pValue=FALSE)
Set Shrink to fit.
applyFromArray($pStyles=NULL)
Apply styles from array.
getVertical()
Get Vertical.
getSharedComponent()
Get the shared style component for the currently active cell in currently active sheet.
getTextRotation()
Get TextRotation.
getWrapText()
Get Wrap Text.
getReadorder()
Get read order.
getHashCode()
Get hash code.
const HORIZONTAL_DISTRIBUTED
const HORIZONTAL_CENTER_CONTINUOUS
setTextRotation($pValue=0)
Set TextRotation.
getActiveSheet()
Get the currently active sheet.
getSelectedCells()
Get the currently active cell coordinate in currently active sheet.