class Settings (View source)

Methods

static bool
setLocale(string $locale)

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

static 
setChartRenderer(string $rendererClass)

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

static null|string
getChartRenderer()

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

static 
setLibXmlLoaderOptions(int $options)

Set default options for libxml loader.

static int
getLibXmlLoaderOptions()

Get default options for libxml loader.

static 
setCache(CacheInterface $cache)

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

static CacheInterface
getCache()

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

Details

static bool setLocale(string $locale)

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")

Return Value

bool Success or failure

static 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

Exceptions

Exception

static null|string getChartRenderer()

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

Return Value

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

static setLibXmlLoaderOptions(int $options)

Set default options for libxml loader.

Parameters

int $options Default options for libxml loader

static int getLibXmlLoaderOptions()

Get default options for libxml loader.

Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly.

Return Value

int Default options for libxml loader

static setCache(CacheInterface $cache)

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

Parameters

CacheInterface $cache

static CacheInterface getCache()

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

Return Value

CacheInterface