\Ceo\Api\ControllersExportController

Export controller handles generation and syncing of content exports. Exports are generally only used by external plugins (see ICML export).

Summary

Methods
Properties
Constants
getStatusCode()
getHeaders()
getPayload()
setStatusCode()
setHeaders()
setPayload()
startBatchMode()
endBatchMode()
getAction()
versionsAction()
versionAction()
dumpAction()
updateAction()
pullAction()
pushAction()
lockAction()
unlockAction()
$batchMode
$batchedResponses
No constants found
initResponse()
_getContent()
getJsonData()
output()
getHttpCodeDescription()
render()
renderException()
$statusCode
$headers
$payload
$format
N/A
No private methods found
No private properties found
N/A

Properties

$batchMode

$batchMode : boolean

Controller is in batch mode

Type

boolean

$batchedResponses

$batchedResponses : array

Stack for batched responses

Type

array

$statusCode

$statusCode : integer

Status code

Type

integer

$headers

$headers : array

Default headers

Type

array

$payload

$payload : string

Response payload

Type

string

$format

$format : string

Response format, always json

Type

string

Methods

getStatusCode()

getStatusCode() : integer

Return status code

Returns

integer

getHeaders()

getHeaders() : array

Return current headers

Returns

array

getPayload()

getPayload() : string

Return payload

Returns

string

setStatusCode()

setStatusCode(integer  $code) 

Set status code

Parameters

integer $code

HTTP status code

setHeaders()

setHeaders(string  $key, string  $value) 

Set header value

Parameters

string $key

Header name

string $value

Header value

setPayload()

setPayload(string  $payload) 

Set payload

Parameters

string $payload

startBatchMode()

startBatchMode() 

Static method to enable batch mode return handling

endBatchMode()

endBatchMode() 

Static method to disable batch mode return handling

getAction()

getAction(  $content_id) : array

Create a new export.

Parameters

$content_id

Returns

array

versionsAction()

versionsAction(  $content_id) : array

Get export versions.

Parameters

$content_id

Returns

array

versionAction()

versionAction(  $content_uuid,   $version_id) : array

Get single export version

Parameters

$content_uuid
$version_id

Returns

array

dumpAction()

dumpAction(  $content_id,   $type) : array

Dump content as type, does not create an export object or new version

Parameters

$content_id
$type

Returns

array

updateAction()

updateAction(  $content_id) 

Parameters

$content_id

pullAction()

pullAction(  $content_id) 

Parameters

$content_id

pushAction()

pushAction(  $content_id) 

Parameters

$content_id

lockAction()

lockAction(  $content_id) 

Parameters

$content_id

unlockAction()

unlockAction(  $content_id) 

Parameters

$content_id

initResponse()

initResponse(integer  $status = 200) 

Reset response headers and payload

Parameters

integer $status

HTTP status code

_getContent()

_getContent(mixed  $payload) : string

Return json encoded string

Parameters

mixed $payload

Payload

Returns

string

getJsonData()

getJsonData() : array

Fetch POSTed/PUTed json data

Returns

array

output()

output() : \Ceo\Core\Controllers\Phalcon\Http\Response

Output the valid response, headers, status code and payload

Returns

\Ceo\Core\Controllers\Phalcon\Http\Response

getHttpCodeDescription()

getHttpCodeDescription(integer  $code) : string

Get http code description text based on code value

Parameters

integer $code

Returns

string

render()

render(string  $st_output, integer  $statusCode = 200) : \Ceo\Core\Controllers\Phalcon\Http\Response

Render output, resets headers and status code.

If batch mode is enabled, will return an array with status code and response.

Parameters

string $st_output

Output string

integer $statusCode

HTTP status code

Returns

\Ceo\Core\Controllers\Phalcon\Http\Response

renderException()

renderException(\Ceo\Core\Controllers\Exception  $e) : \Ceo\Core\Controllers\Phalcon\Http\Response

Render a trapped exception

Parameters

\Ceo\Core\Controllers\Exception $e

Returns

\Ceo\Core\Controllers\Phalcon\Http\Response