Overview

Namespaces

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

Classes

  • App
  • AppConfig
  • AppContainer

Interfaces

  • AppAwareInterface

Traits

  • AppAwareTrait
  • CallableResolverAwareTrait
  • Overview
  • Namespace
  • Class

Class App

Charcoal App

This is the primary class with which you instantiate, configure, and run a Slim Framework application within Charcoal.

Slim\App
Extended by Charcoal\App\App implements Charcoal\Config\ConfigurableInterface uses Charcoal\Config\ConfigurableTrait (not available)
Namespace: Charcoal\App
Located at Charcoal/App/App.php
Methods summary
public static Charcoal\App\App
# instance( Container|array $container = [] )

Getter for creating/returning the unique instance of this class.

Getter for creating/returning the unique instance of this class.

Parameters

$container
The application's settings.

Returns

Charcoal\App\App
public
# __construct( ContainerInterface|array $container = [] )

Create new Charcoal application (and SlimApp).

Create new Charcoal application (and SlimApp).

Dependencies

Required

  • config — AppConfig

Optional

  • logger — PSR-3 Logger

Parameters

$container
The application's settings.

Throws

LogicException
If trying to create a new instance of a singleton.

Uses

SlimApp::__construct()
public Psr\Http\Message\ResponseInterface
# run( boolean $silent = false )

Run application.

Run application.

Initialize the Charcoal application before running (with SlimApp).

Parameters

$silent
If true, will run in silent mode (no response).

Returns

Psr\Http\Message\ResponseInterface
The PSR7 HTTP response.

Uses

self::setup()
protected Charcoal\App\Module\ModuleManager
# moduleManager( )

Retrieve the application's module manager.

Retrieve the application's module manager.

Returns

Charcoal\App\Module\ModuleManager
protected Charcoal\App\Route\RouteManager
# routeManager( )

Retrieve the application's route manager.

Retrieve the application's route manager.

Returns

Charcoal\App\Route\RouteManager
protected
# setupRoutables( )

Setup the application's "global" routables.

Setup the application's "global" routables.

Routables can only be defined globally (app-level) for now.

Properties summary
protected static Charcoal\App\App $instance

Store the unique instance

Store the unique instance

#
API documentation generated by ApiGen