本文整理汇总了PHP中PHPExcel_Calculation::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Calculation::instance方法的具体用法?PHP PHPExcel_Calculation::instance怎么用?PHP PHPExcel_Calculation::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPExcel_Calculation
的用法示例。
在下文中一共展示了PHPExcel_Calculation::instance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInstance
/**
* 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) {
$instance = $workbook->getCalculationEngine();
if (isset($instance)) {
return $instance;
}
}
if (!isset(self::$instance) || self::$instance === null) {
self::$instance = new PHPExcel_Calculation();
}
return self::$instance;
}
示例2: getInstance
/**
* 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;
}