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