Class AbstractAction
Default implementation, as abstract class, of the ActionInterface
.
Actions respond to a (PSR7-style) request and response and returns back the response.
Typical implementations only need to implement the following 2 abstract methods:
// Returns an associative array of results
public function results();
// Gets a psr7 request and response and returns a response
public function run(RequestInterface $request, ResponseInterface $response);
Actions can be invoked (with the magic __invoke()
method) which automatically call the:
- Charcoal\Config\AbstractEntity
- Charcoal\App\Action\AbstractAction implements Charcoal\App\Action\ActionInterface, Psr\Log\LoggerAwareInterface uses Psr\Log\LoggerAwareTrait (not available)
public
|
|
public
boolean
|
|
public
|
#
setDependencies( Pimple\Container $container )
Give an opportunity to children classes to inject dependencies from a Pimple Container. |
final public
Psr\Http\Message\ResponseInterface
|
|
public
|
|
public
string
|
|
public
|
|
public
boolean
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
string
|
|
abstract public
array
|
|
abstract public
Psr\Http\Message\ResponseInterface
|
setData()
|
string |
MODE_JSON
|
#
'json'
|
string |
MODE_XML
|
#
'xml'
|
string |
MODE_REDIRECT
|
#
'redirect'
|
string |
DEFAULT_MODE
|