本文整理汇总了PHP中PHPExcel_Autoloader类的典型用法代码示例。如果您正苦于以下问题:PHP PHPExcel_Autoloader类的具体用法?PHP PHPExcel_Autoloader怎么用?PHP PHPExcel_Autoloader使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PHPExcel_Autoloader类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAutoloadValidPHPExcelClass
public function testAutoloadValidPHPExcelClass()
{
$className = 'PHPExcel_IOFactory';
$result = PHPExcel_Autoloader::Load($className);
// Check that class has been loaded
$this->assertTrue(class_exists($className));
}
示例2: dirname
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 1.7.3, 2010-05-17
*/
/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
/**
* @ignore
*/
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
PHPExcel_Autoloader::Register();
PHPExcel_Shared_ZipStreamWrapper::register();
// check mbstring.func_overload
if (ini_get('mbstring.func_overload') & 2) {
throw new Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
}
}
/**
* PHPExcel_Reader_Excel2007
*
* @category PHPExcel
* @package PHPExcel_Reader
* @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
*/
class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader
示例3: __construct
/**
* Create a new PHPExcel with one Worksheet
*/
public function __construct()
{
PHPExcel_Autoloader::Register();
// Initialise worksheet collection and add one worksheet
$this->_workSheetCollection = array();
$this->_workSheetCollection[] = new PHPExcel_Worksheet($this);
$this->_activeSheetIndex = 0;
// Create document properties
$this->_properties = new PHPExcel_DocumentProperties();
// Create document security
$this->_security = new PHPExcel_DocumentSecurity();
// Set named ranges
$this->_namedRanges = array();
// Create the cellXf supervisor
$this->_cellXfSupervisor = new PHPExcel_Style(true);
$this->_cellXfSupervisor->bindParent($this);
// Create the default style
$this->addCellXf(new PHPExcel_Style());
$this->addCellStyleXf(new PHPExcel_Style());
}