Structures_DataGrid_Renderer_CSV
[ class tree: Structures_DataGrid_Renderer_CSV ] [ index: Structures_DataGrid_Renderer_CSV ] [ all elements ]

Class: Structures_DataGrid_Renderer_CSV

Source Location: /Structures_DataGrid_Renderer_CSV-0.1.5dev1/Structures/DataGrid/Renderer/CSV.php

Class Overview

Structures_DataGrid_Renderer
   |
   --Structures_DataGrid_Renderer_CSV

CSV Rendering Driver


Author(s):

Version:

  • $Revision: 256842 $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 91]
CSV Rendering Driver

SUPPORTED OPTIONS:

  • delimiter: (string) Field delimiter
  • filename: (string) Filename of the generated CSV file; boolean false means that no filename will be sent
  • saveToFile: (boolean) Whether the output should be saved on the local filesystem. Please note that the 'filename' option must be given if this option is set to true.
  • writeMode: (string) The mode that is used in the internal fopen() calls. Useful e.g. when you want to append to existing file. C.p. the fopen() documentation for the allowed modes.
  • enclosure: (string) Field enclosure
  • lineBreak: (string) The character(s) to use for line breaks
  • useQuotes: (mixed) Whether or not to encapsulate the values with the enclosure value. true: always, false: never, 'auto': when needed
  • targetEncoding: (string) If set, the content will be converted from encoding to targetEncoding. A BOM will also be added, if relevant. See PHP mbstring documentation for encoding names. Tip: for Excel use 'UTF-16LE'.
  • columnAttributes: (-) IGNORED
  • onMove: (-) IGNORED
  • onMoveData: (-) IGNORED
SUPPORTED OPERATION MODES:

  • Container Support: no
  • Output Buffering: yes
  • Direct Rendering: yes
  • Streaming: yes
  • Object Preserving: no



[ Top ]


Method Detail

Structures_DataGrid_Renderer_CSV (Constructor)   [line 114]

Structures_DataGrid_Renderer_CSV Structures_DataGrid_Renderer_CSV( )

Constructor

Build default values

  • Access: public

[ Top ]

buildHeader   [line 224]

void buildHeader( &$columns)

Handles building the header of the table
  • Access: protected

Parameters:

   &$columns   — 

[ Top ]

buildRow   [line 252]

void buildRow( int $index, array $data)

Build a body row
  • Access: protected

Parameters:

int   $index   —  Row index (zero-based)
array   $data   —  Record data.

[ Top ]

finalize   [line 285]

void finalize( )

Finish building the datagrid.
  • Access: protected

[ Top ]

flatten   [line 302]

string flatten( )

Retrieve output from the container object
  • Return: Output
  • Access: protected

[ Top ]

init   [line 142]

void init( )

Initialize CSV output
  • Access: protected

[ Top ]

render   [line 312]

void render( )

Render to the standard output
  • Access: public

[ Top ]

setDelimiter   [line 170]

string setDelimiter( $delimiter)

Define the CSV delimiter
  • Return: The CSV delimiter to use
  • Access: public

Parameters:

   $delimiter   — 

[ Top ]

setLineBreak   [line 181]

string setLineBreak( $lineBreak)

Define the character to use for line breaks
  • Return: The character(s) to use for line breaks (e.g. \n)
  • Access: public

Parameters:

   $lineBreak   — 

[ Top ]

setUseQuotes   [line 193]

boolean setUseQuotes( $bool)

Set the switch to encapsulate the values with quotes
  • Return: The boolean value to determine whether or not to wrap values with quotes
  • Access: public

Parameters:

   $bool   — 

[ Top ]

toCSV   [line 274]

string toCSV( )

Returns the CSV format for the DataGrid
  • Return: The CSV of the DataGrid
  • Access: public

[ Top ]

_recordToCsv   [line 336]

string _recordToCsv( array $data)

Convert record values into a CSV line
  • Return: CSV string, with a lineBreak included
  • Access: protected

Parameters:

array   $data   —  Record data

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:40:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.