Page MenuHomePhorge
Diviner Tech Docs AphrontResponseProducerInterface

interface AphrontResponseProducerInterface
Phorge Technical Documentation (Aphront)

An object can implement this interface to allow it to be returned directly from an AphrontController.

Normally, controllers must return an AphrontResponse. Sometimes, this is not convenient or requires an awkward API. If it's preferable to return some other type of object which is equivalent to or describes a valid response, that object can implement this interface and produce a response later.

Methods

public function produceAphrontResponse()

Produce the equivalent AphrontResponse for this object.

Return
AphrontResponseEquivalent response.