Overview

Namespaces

  • Charcoal
    • App
      • Action
      • Config
      • Handler
      • Middleware
      • Module
      • Route
      • Script
      • ServiceProvider
      • Template

Classes

  • Charcoal\App\Action\AbstractAction
  • Charcoal\App\App
  • Charcoal\App\AppConfig
  • Charcoal\App\AppContainer
  • Charcoal\App\Config\CacheConfig
  • Charcoal\App\Config\DatabaseConfig
  • Charcoal\App\Config\FilesystemConfig
  • Charcoal\App\Config\LoggerConfig
  • Charcoal\App\Config\MemcacheCacheConfig
  • Charcoal\App\Config\MemcacheCacheServerConfig
  • Charcoal\App\Handler\AbstractHandler
  • Charcoal\App\Handler\Error
  • Charcoal\App\Handler\HandlerConfig
  • Charcoal\App\Handler\NotAllowed
  • Charcoal\App\Handler\NotFound
  • Charcoal\App\Handler\PhpError
  • Charcoal\App\Handler\Shutdown
  • Charcoal\App\Middleware\CacheMiddleware
  • Charcoal\App\Module\AbstractModule
  • Charcoal\App\Module\ModuleConfig
  • Charcoal\App\Module\ModuleManager
  • Charcoal\App\Route\ActionRoute
  • Charcoal\App\Route\ActionRouteConfig
  • Charcoal\App\Route\RouteConfig
  • Charcoal\App\Route\RouteManager
  • Charcoal\App\Route\ScriptRoute
  • Charcoal\App\Route\ScriptRouteConfig
  • Charcoal\App\Route\TemplateRoute
  • Charcoal\App\Route\TemplateRouteConfig
  • Charcoal\App\Script\AbstractScript
  • Charcoal\App\ServiceProvider\AppServiceProvider
  • Charcoal\App\ServiceProvider\CacheServiceProvider
  • Charcoal\App\ServiceProvider\DatabaseServiceProvider
  • Charcoal\App\ServiceProvider\FilesystemServiceProvider
  • Charcoal\App\ServiceProvider\LoggerServiceProvider
  • Charcoal\App\ServiceProvider\ViewServiceProvider
  • Charcoal\App\Template\AbstractTemplate
  • Charcoal\App\Template\AbstractWidget
  • Charcoal\App\Template\WidgetBuilder

Interfaces

  • Charcoal\App\Action\ActionInterface
  • Charcoal\App\AppAwareInterface
  • Charcoal\App\Handler\HandlerInterface
  • Charcoal\App\Module\ModuleInterface
  • Charcoal\App\Route\RouteInterface
  • Charcoal\App\Script\CronScriptInterface
  • Charcoal\App\Script\ScriptInterface
  • Charcoal\App\Template\TemplateInterface
  • Charcoal\App\Template\WidgetInterface

Traits

  • Charcoal\App\AppAwareTrait
  • Charcoal\App\CallableResolverAwareTrait
  • Charcoal\App\Script\ArgScriptTrait
  • Charcoal\App\Script\CronScriptTrait
  • Charcoal\App\Script\PathScriptTrait
  • Overview
  • Namespace
  • Class
  1: <?php
  2: 
  3: namespace Charcoal\App\Action;
  4: 
  5: // PSR-7 (http messaging) dependencies
  6: use \Psr\Http\Message\RequestInterface;
  7: use \Psr\Http\Message\ResponseInterface;
  8: 
  9: // Dependencies from `Pimple`
 10: use \Pimple\Container;
 11: 
 12: /**
 13:  *
 14:  */
 15: interface ActionInterface
 16: {
 17:     /**
 18:      * Actions are callable, with http request and response as parameters.
 19:      *
 20:      * @param RequestInterface  $request  A PSR-7 compatible Request instance.
 21:      * @param ResponseInterface $response A PSR-7 compatible Response instance.
 22:      * @return ResponseInterface
 23:      */
 24:     public function __invoke(RequestInterface $request, ResponseInterface $response);
 25: 
 26:     /**
 27:      * Give an opportunity to children classes to inject dependencies from a Pimple Container.
 28:      *
 29:      * Does nothing by default, reimplement in children classes.
 30:      *
 31:      * The `$container` DI-container (from `Pimple`) should not be saved or passed around, only to be used to
 32:      * inject dependencies (typically via setters).
 33:      *
 34:      * @param Container $container A dependencies container instance.
 35:      * @return void
 36:      */
 37:     public function setDependencies(Container $container);
 38: 
 39:     /**
 40:      * @param array $data The data to set.
 41:      * @return ActionInterface Chainable
 42:      */
 43:     public function setData(array $data);
 44: 
 45:     /**
 46:      * @param string $mode The action mode.
 47:      * @return ActionInterface Chainable
 48:      */
 49:     public function setMode($mode);
 50: 
 51:     /**
 52:      * @return string
 53:      */
 54:     public function mode();
 55: 
 56:     /**
 57:      * @param boolean $success Success flag (true / false).
 58:      * @return ActionInterface Chainable
 59:      */
 60:     public function setSuccess($success);
 61: 
 62:     /**
 63:      * @return boolean
 64:      */
 65:     public function success();
 66: 
 67:     /**
 68:      * @param string $url The success URL.
 69:      * @return ActionInterface Chainable
 70:      */
 71:     public function setSuccessUrl($url);
 72: 
 73:     /**
 74:      * @return string
 75:      */
 76:     public function successUrl();
 77: 
 78:     /**
 79:      * @param string $url The success URL.
 80:      * @return ActionInterface Chainable
 81:      */
 82:     public function setFailureUrl($url);
 83: 
 84:     /**
 85:      * @return string
 86:      */
 87:     public function failureUrl();
 88: 
 89:     /**
 90:      * @return string
 91:      */
 92:     public function redirectUrl();
 93: 
 94:     /**
 95:      * @return array
 96:      */
 97:     public function results();
 98: 
 99:     /**
100:      * @param RequestInterface  $request  A PSR-7 compatible Request instance.
101:      * @param ResponseInterface $response A PSR-7 compatible Response instance.
102:      * @return ResponseInterface
103:      */
104:     public function run(RequestInterface $request, ResponseInterface $response);
105: 
106:     /**
107:      * Initialize the action with a request.
108:      *
109:      * @param RequestInterface $request The request to initialize.
110:      * @return boolean Success / Failure.
111:      */
112:     public function init(RequestInterface $request);
113: }
114: 
API documentation generated by ApiGen