\Ceo\Api\ControllersAttachmentController

Attachment controller

Simply handles updating the master file

Summary

Methods
Properties
Constants
getStatusCode()
getHeaders()
getPayload()
setStatusCode()
setHeaders()
setPayload()
startBatchMode()
endBatchMode()
updateAction()
$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

updateAction()

updateAction(string  $uuid) : \Ceo\Api\Controllers\Phalcon\Http\Response

Update attachment item

Note that attempted to update a content item with out a lock or a lock that doesn't belong to the current user will error.

Parameters

string $uuid

UUID

Returns

\Ceo\Api\Controllers\Phalcon\Http\Response

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