You are here

public function PHPExcel_Style_Borders::__construct in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Borders.php \PHPExcel_Style_Borders::__construct()

Create a new PHPExcel_Style_Borders * *

Parameters

boolean $isSupervisor Flag indicating if this is a supervisor or not: * Leave this value at default unless you understand exactly what * its ramifications are * @param boolean $isConditional Flag indicating if this is a conditional style or not * Leave this value at default unless you understand exactly what * its ramifications are

Overrides PHPExcel_Style_Supervisor::__construct

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Borders.php, line 131

Class

PHPExcel_Style_Borders
PHPExcel_Style_Borders

Code

public function __construct($isSupervisor = FALSE, $isConditional = FALSE) {

  // Supervisor?
  parent::__construct($isSupervisor);

  // Initialise values
  $this->_left = new PHPExcel_Style_Border($isSupervisor, $isConditional);
  $this->_right = new PHPExcel_Style_Border($isSupervisor, $isConditional);
  $this->_top = new PHPExcel_Style_Border($isSupervisor, $isConditional);
  $this->_bottom = new PHPExcel_Style_Border($isSupervisor, $isConditional);
  $this->_diagonal = new PHPExcel_Style_Border($isSupervisor, $isConditional);
  $this->_diagonalDirection = PHPExcel_Style_Borders::DIAGONAL_NONE;

  // Specially for supervisor
  if ($isSupervisor) {

    // Initialize pseudo-borders
    $this->_allBorders = new PHPExcel_Style_Border(TRUE);
    $this->_outline = new PHPExcel_Style_Border(TRUE);
    $this->_inside = new PHPExcel_Style_Border(TRUE);
    $this->_vertical = new PHPExcel_Style_Border(TRUE);
    $this->_horizontal = new PHPExcel_Style_Border(TRUE);

    // bind parent if we are a supervisor
    $this->_left
      ->bindParent($this, '_left');
    $this->_right
      ->bindParent($this, '_right');
    $this->_top
      ->bindParent($this, '_top');
    $this->_bottom
      ->bindParent($this, '_bottom');
    $this->_diagonal
      ->bindParent($this, '_diagonal');
    $this->_allBorders
      ->bindParent($this, '_allBorders');
    $this->_outline
      ->bindParent($this, '_outline');
    $this->_inside
      ->bindParent($this, '_inside');
    $this->_vertical
      ->bindParent($this, '_vertical');
    $this->_horizontal
      ->bindParent($this, '_horizontal');
  }
}