/** * Get an instance of this class * * @return PHPExcel_Calculation */ public static function getInstance() { if (! isset ( self::$_instance ) || is_null ( self::$_instance )) { self::$_instance = new PHPExcel_Calculation ( ); } return self::$_instance; }
/** * Get an instance of this class * * @access public * @param PHPExcel $workbook Injected workbook for working with a PHPExcel object, * or NULL to create a standalone claculation engine * @return PHPExcel_Calculation */ 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; }
/** * Get an instance of this class * * @access public * @param PHPExcel $workbook Injected workbook for working with a PHPExcel object, * or NULL to create a standalone claculation engine * @return PHPExcel_Calculation */ public static function getInstance(PHPExcel $workbook = NULL) { if ($workbook !== NULL) { Yii::import('application.components.PHPExcel.PHPExcel.Calculation.PHPExcel_Calculation_Function'); 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; }