Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/aphront/interface/AphrontResponseProducerInterface.php
12241 views
1
<?php
2
3
/**
4
* An object can implement this interface to allow it to be returned directly
5
* from an @{class:AphrontController}.
6
*
7
* Normally, controllers must return an @{class:AphrontResponse}. Sometimes,
8
* this is not convenient or requires an awkward API. If it's preferable to
9
* return some other type of object which is equivalent to or describes a
10
* valid response, that object can implement this interface and produce a
11
* response later.
12
*/
13
interface AphrontResponseProducerInterface {
14
15
16
/**
17
* Produce the equivalent @{class:AphrontResponse} for this object.
18
*
19
* @return AphrontResponse Equivalent response.
20
*/
21
public function produceAphrontResponse();
22
23
24
}
25
26