79 if (!is_a($rendererClass, IRenderer::class,
true)) {
80 throw new Exception(
'Chart renderer must implement ' . IRenderer::class);
83 self::$chartRenderer = $rendererClass;
94 return self::$chartRenderer;
104 if (
$options === null && defined(
'LIBXML_DTDLOAD')) {
105 $options = LIBXML_DTDLOAD | LIBXML_DTDATTR;
107 self::$libXmlLoaderOptions =
$options;
118 if (self::$libXmlLoaderOptions === null && defined(
'LIBXML_DTDLOAD')) {
119 self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
120 } elseif (self::$libXmlLoaderOptions === null) {
121 self::$libXmlLoaderOptions = 0;
124 return self::$libXmlLoaderOptions;
139 self::$libXmlDisableEntityLoader = (bool)
$state;
149 return self::$libXmlDisableEntityLoader;
168 self::$cache =
new Memory();
188 self::$httpClient = null;
189 self::$requestFactory = null;
197 self::assertHttpClient();
199 return self::$httpClient;
207 self::assertHttpClient();
209 return self::$requestFactory;
214 if (!self::$httpClient || !self::$requestFactory) {
215 throw new Exception(
'HTTP client must be configured via Settings::setHttpClient() to be able to use WEBSERVICE function.');
static getCache()
Gets the implementation of cache that should be used for cell collection.
static $libXmlLoaderOptions
static setLocale($locale)
Set the locale code to use for formula translations and any special formatting.
static setHttpClient(ClientInterface $httpClient, RequestFactoryInterface $requestFactory)
Set the HTTP client implementation to be used for network request.
static getChartRenderer()
Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use...
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
static getLibXmlDisableEntityLoader()
Return the state of the entity loader (disabled/enabled) for libxml loader.
static setChartRenderer($rendererClass)
Identify to PhpSpreadsheet the external library to use for rendering charts.
static getHttpClient()
Get the HTTP client implementation to be used for network request.
static getRequestFactory()
Get the HTTP request factory.
static unsetHttpClient()
Unset the HTTP client configuration.
static assertHttpClient()
static getInstance(?Spreadsheet $spreadsheet=null)
Get an instance of this class.
static setCache(CacheInterface $cache)
Sets the implementation of cache that should be used for cell collection.
static getLibXmlLoaderOptions()
Get default options for libxml loader.
static $libXmlDisableEntityLoader
This is the default implementation for in-memory cell collection.
static setLibXmlLoaderOptions($options)
Set default options for libxml loader.
static setLibXmlDisableEntityLoader($state)
Enable/Disable the entity loader for libxml loader.