File Source for Settings.php

PHPExcel_Settings

# Source for file Settings.php

Documentation is available at Settings.php

1. <?php
2. /**
3. * PHPExcel
4. *
5. * Copyright (c) 2006 - 2011 PHPExcel
6. *
7. * This library is free software; you can redistribute it and/or
8. * modify it under the terms of the GNU Lesser General Public
9. * License as published by the Free Software Foundation; either
10. * version 2.1 of the License, or (at your option) any later version.
11. *
12. * This library is distributed in the hope that it will be useful,
13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15. * Lesser General Public License for more details.
16. *
17. * You should have received a copy of the GNU Lesser General Public
18. * License along with this library; if not, write to the Free Software
19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20. *
21. * @category PHPExcel
22. * @package PHPExcel_Settings
23. * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)
24. * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25. * @version 1.7.6, 2011-02-27
26. */
28. /** PHPExcel root directory */
29. if (! defined('PHPEXCEL_ROOT')) {
30. /**
31. * @ignore
32. */
33. define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
34. require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
35. }
38. class PHPExcel_Settings
39. {
40. /** constants */
41. const PCLZIP = 'PHPExcel_Shared_ZipArchive';
42. const ZIPARCHIVE = 'ZipArchive';
45. private static $_zipClass = self:: ZIPARCHIVE;
48. /**
49. * Set the Zip Class to use (PCLZip or ZipArchive)
50. *
51. * @param string $zipClass PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
52. * @return boolean Success or failure
53. */
54. public static function setZipClass($zipClass) {
55. if (($zipClass == self:: PCLZIP) ||
56. ($zipClass == self:: ZIPARCHIVE)) {
57. self::$_zipClass = $zipClass;
58. return True;
59. }
60. return False;
61. } // function setZipClass()
64. /**
65. * Return the Zip Class to use (PCLZip or ZipArchive)
66. *
67. * @return string Zip Class to use - PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
68. */
69. public static function getZipClass() {
70. return self::$_zipClass;
71. } // function getZipClass()
74. public static function getCacheStorageMethod() {
75. return PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod;
76. } // function getCacheStorageMethod()
79. public static function getCacheStorageClass() {
80. return PHPExcel_CachedObjectStorageFactory::$_cacheStorageClass;
81. } // function getCacheStorageClass()
84. public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory:: cache_in_memory, $arguments = array()) {
85. return PHPExcel_CachedObjectStorageFactory:: initialize($method,$arguments);
86. } // function setCacheStorageMethod()
89. public static function setLocale($locale){
90. return PHPExcel_Calculation:: getInstance()->setLocale($locale);
91. } // function setLocale()
93. }

Documentation generated on Sun, 27 Feb 2011 16:33:48 -0800 by phpDocumentor 1.4.3