\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 : int

Default options for libxml loader.

Type

int

$libXmlDisableEntityLoader

$libXmlDisableEntityLoader : bool

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 7.1 < 7.1.13 7.0 < 7.0.27 5.6 ANY then you may need to disable this check to prevent unwanted behaviour in other threads SECURITY WARNING: Changing this flag is not recommended.

Type

bool

$cache

$cache : \Psr\SimpleCache\CacheInterface

The cache implementation to be used for cell collection.

Type

CacheInterface

Methods

setLocale()

setLocale(string  $locale) : bool

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

bool —

Success or failure

setChartRenderer()

setChartRenderer(string  $rendererClass) : mixed

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

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

mixed —

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(int  $options) : mixed

Set default options for libxml loader.

Parameters

int $options

Default options for libxml loader

Returns

mixed —

getLibXmlLoaderOptions()

getLibXmlLoaderOptions() : int

Get default options for libxml loader.

Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly.

Returns

int —

Default options for libxml loader

setLibXmlDisableEntityLoader()

setLibXmlDisableEntityLoader(bool  $state) : mixed

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 7.1 < 7.1.13 7.0 < 7.0.27 5.6 ANY 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

bool $state

Returns

mixed —

getLibXmlDisableEntityLoader()

getLibXmlDisableEntityLoader() : bool

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

Returns

bool —

$state

setCache()

setCache(\Psr\SimpleCache\CacheInterface  $cache) : mixed

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

Parameters

\Psr\SimpleCache\CacheInterface $cache

Returns

mixed —

getCache()

getCache() : \Psr\SimpleCache\CacheInterface

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

Returns

\Psr\SimpleCache\CacheInterface —