PHP Class Controllers\Api\Exports

Inheritance: extends Controllers\Api\Resources
Datei anzeigen Open project: learninglocker/learninglocker

Public Methods

Method Description
__construct ( Locker\Repository\Export\Repository $export ) Constructs a new Exporting Controller.
showCsv ( String $id ) : StreamedResponse. Exports statements as CSV.
showJson ( String $id ) : StreamedResponse. Exports statements as JSON.

Private Methods

Method Description
quoteCSV ( String $field ) : String Adds quotes to a comma separated value.

Method Details

__construct() public method

Constructs a new Exporting Controller.
public __construct ( Locker\Repository\Export\Repository $export )
$export Locker\Repository\Export\Repository Injected export repository.

showCsv() public method

Exports statements as CSV.
public showCsv ( String $id ) : StreamedResponse.
$id String Export's ID.
return StreamedResponse.

showJson() public method

Exports statements as JSON.
public showJson ( String $id ) : StreamedResponse.
$id String Export's ID.
return StreamedResponse.