PHP Class CsvEncodeView, cakephp-rest-plugin

Author: Primeminister
Inheritance: extends View
Afficher le fichier Open project: kvz/cakephp-rest-plugin

Méthodes publiques

Méthode Description
encode ( array $response ) : string create csv string from response
headers ( $Controller, $settings )
render ( $action = null, $layout = null, $file = null )

Méthodes protégées

Méthode Description
_putcsv ( array $row, string $delimiter = ';', string $enclosure = '"', string $eol = " " ) : string Creating a file resource to php://temp so we don;t save a real file and return the string of that csv line

Method Details

_putcsv() protected méthode

Creating a file resource to php://temp so we don;t save a real file and return the string of that csv line
protected _putcsv ( array $row, string $delimiter = ';', string $enclosure = '"', string $eol = " " ) : string
$row array
$delimiter string
$enclosure string
$eol string
Résultat string

encode() public méthode

create csv string from response
public encode ( array $response ) : string
$response array with 'meta' and 'data' part
Résultat string

headers() public méthode

public headers ( $Controller, $settings )

render() public méthode

public render ( $action = null, $layout = null, $file = null )