\PhpOffice\PhpSpreadsheetSettings

Summary

Methods
Properties
Constants
setLocale()
setChartRenderer()
getChartRenderer()
setLibXmlLoaderOptions()
getLibXmlLoaderOptions()
setLibXmlDisableEntityLoader()
getLibXmlDisableEntityLoader()
setCache()
getCache()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$chartRenderer
$libXmlLoaderOptions
$libXmlDisableEntityLoader
$cache
N/A

Properties

$chartRenderer

$chartRenderer : string

Class name of the chart renderer used for rendering charts eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph.

Type

string

$libXmlLoaderOptions

$libXmlLoaderOptions : integer

Default options for libxml loader.

Type

integer

$libXmlDisableEntityLoader

$libXmlDisableEntityLoader : boolean

Allow/disallow libxml_disable_entity_loader() call when not thread safe.

Default behaviour is to do the check, but if you're running PHP versions 7.2 < 7.2.1 then you may need to disable this check to prevent unwanted behaviour in other threads SECURITY WARNING: Changing this flag is not recommended.

Type

boolean

Methods

setLocale()

setLocale(string  $locale) : boolean

Set the locale code to use for formula translations and any special formatting.

Parameters

string $locale

The locale code to use (e.g. "fr" or "pt_br" or "en_uk")

Returns

boolean —

Success or failure

setChartRenderer()

setChartRenderer(string  $rendererClass) 

Identify to PhpSpreadsheet the external library to use for rendering charts.

Parameters

string $rendererClass

Class name of the chart renderer eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph

getChartRenderer()

getChartRenderer() : null|string

Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use.

Returns

null|string —

Class name of the chart renderer eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph

setLibXmlLoaderOptions()

setLibXmlLoaderOptions(integer  $options) 

Set default options for libxml loader.

Parameters

integer $options

Default options for libxml loader

getLibXmlLoaderOptions()

getLibXmlLoaderOptions() : integer

Get default options for libxml loader.

Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly.

Returns

integer —

Default options for libxml loader

setLibXmlDisableEntityLoader()

setLibXmlDisableEntityLoader(boolean  $state) 

Enable/Disable the entity loader for libxml loader.

Allow/disallow libxml_disable_entity_loader() call when not thread safe. Default behaviour is to do the check, but if you're running PHP versions 7.2 < 7.2.1 then you may need to disable this check to prevent unwanted behaviour in other threads SECURITY WARNING: Changing this flag to false is not recommended.

Parameters

boolean $state

getLibXmlDisableEntityLoader()

getLibXmlDisableEntityLoader() : boolean

Return the state of the entity loader (disabled/enabled) for libxml loader.

Returns

boolean —

$state

setCache()

setCache(\Psr\SimpleCache\CacheInterface  $cache) 

Sets the implementation of cache that should be used for cell collection.

Parameters

\Psr\SimpleCache\CacheInterface $cache

getCache()

getCache() : \Psr\SimpleCache\CacheInterface

Gets the implementation of cache that should be used for cell collection.

Returns

\Psr\SimpleCache\CacheInterface