Function CMS_Spreadsheet_Reader->__construct

Definitions

sources/files_spreadsheets_read.php

  • Constructor. Opens spreadsheet for reading.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$path PATH No No required parameter N/A N/A File path
$filename string No No required parameter N/A N/A Filename
$algorithm integer No No 3 N/A N/A An ALGORITHM_* constant
$trim boolean No No True N/A N/A Whether to trim each cell
$default_charset ?string No No Blank (empty string) N/A N/A The default character set to assume if none is specified in the file (null: website character set) (blank: smart detection)

Preview

Code (PHP)

/**
 * Constructor. Opens spreadsheet for reading.
 *
 * @param  PATH $path File path
 * @param  string $filename Filename
 * @param  integer $algorithm An ALGORITHM_* constant
 * @param  boolean $trim Whether to trim each cell
 * @param  ?string $default_charset The default character set to assume if none is specified in the file (null: website character set) (blank: smart detection)
 */

public function __construct(string $path, string $filename, int $algorithm = 3, bool $trim = true, ?string $default_charset = '')