You are here

public function PHPExcel_Writer_Excel2007_Style::allBorders in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php \PHPExcel_Writer_Excel2007_Style::allBorders()

* Get an array of all borders * *

Parameters

PHPExcel $pPHPExcel: * @return PHPExcel_Style_Borders[] All borders in PHPExcel * @throws PHPExcel_Writer_Exception

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php, line 671

Class

PHPExcel_Writer_Excel2007_Style
PHPExcel_Writer_Excel2007_Style

Code

public function allBorders(PHPExcel $pPHPExcel = null) {

  // Get an array of unique borders
  $aBorders = array();
  $aStyles = $this
    ->allStyles($pPHPExcel);
  foreach ($aStyles as $style) {
    if (!array_key_exists($style
      ->getBorders()
      ->getHashCode(), $aBorders)) {
      $aBorders[$style
        ->getBorders()
        ->getHashCode()] = $style
        ->getBorders();
    }
  }
  return $aBorders;
}