Function CMS_CSV_Writer->__construct

Definitions

sources/files_spreadsheets_write.php

  • Open spreadsheet for writing.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
&$path ?PATH Yes No required parameter N/A N/A File to write into (null: create a temporary file and return by reference)
$filename string No No required parameter N/A N/A Filename
$algorithm integer No No 3 N/A N/A An ALGORITHM_* constant
$charset ?string No No Null N/A N/A The character set to write with (if supported) (null: website character set)
$format integer No No 1 N/A N/A A FORMAT_* constant
$write_bom boolean No No True N/A N/A Whether to write a byte-order-mark (BOM)

Preview

Code (PHP)

/**
 * Open spreadsheet for writing.
 *
 * @param  ?PATH $path File to write into (null: create a temporary file and return by reference)
 * @param  string $filename Filename
 * @param  integer $algorithm An ALGORITHM_* constant
 * @param  ?string $charset The character set to write with (if supported) (null: website character set)
 * @param  integer $format A FORMAT_* constant
 * @param  boolean $write_bom Whether to write a byte-order-mark (BOM)
 */

public function __construct(?string &$path, string $filename, int $algorithm = 3, ?string $charset = null, int $format = 1, bool $write_bom = true)