You are here

public static function PHPExcel_Calculation::getInstance in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php \PHPExcel_Calculation::getInstance()

* Get an instance of this class * * @access public *

Parameters

PHPExcel $workbook Injected workbook for working with a PHPExcel object,: * or NULL to create a standalone claculation engine * @return PHPExcel_Calculation

4 calls to PHPExcel_Calculation::getInstance()
13calculation.php in vendor/phpoffice/phpexcel/Examples/13calculation.php
18extendedcalculation.php in vendor/phpoffice/phpexcel/Examples/18extendedcalculation.php
PHPExcel::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel.php
* Create a new PHPExcel with one Worksheet
PHPExcel_Chart_DataSeriesValues::refresh in vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeriesValues.php

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php, line 1765

Class

PHPExcel_Calculation
PHPExcel_Calculation (Multiton)

Code

public static function getInstance(PHPExcel $workbook = NULL) {
  if ($workbook !== NULL) {
    if (isset(self::$_workbookSets[$workbook
      ->getID()])) {
      return self::$_workbookSets[$workbook
        ->getID()];
    }
    return new PHPExcel_Calculation($workbook);
  }
  if (!isset(self::$_instance) || self::$_instance === NULL) {
    self::$_instance = new PHPExcel_Calculation();
  }
  return self::$_instance;
}