Methods summary
public
array
|
#
defaults( )
Default app-config values.
Default app-config values.
Returns
array
|
public
Charcoal\App\AppConfig
|
#
setBasePath( string $path )
Set the application's absolute root path.
Set the application's absolute root path.
Resolves symlinks with realpath() and ensure trailing slash.
Parameters
- $path
- The absolute path to the application's root directory.
Returns
Throws
InvalidArgumentException If the argument is not a string.
|
public
string
|
#
basePath( )
Retrieve the application's absolute root path.
Retrieve the application's absolute root path.
Returns
string The absolute path to the application's root directory.
|
public
Charcoal\App\AppConfig
|
#
setPublicPath( string $path )
Set the application's absolute path to the public web directory.
Set the application's absolute path to the public web directory.
Parameters
- $path
- The path to the application's public directory.
Returns
Throws
InvalidArgumentException If the argument is not a string.
|
public
string
|
#
publicPath( )
Retrieve the application's absolute path to the public web directory.
Retrieve the application's absolute path to the public web directory.
Returns
string The absolute path to the application's public directory.
|
public
|
#
setStoragePath( string|null $path )
Set the application's absolute path to the storage directory.
Set the application's absolute path to the storage directory.
Parameters
- $path
- The path to the application's storage directory.
Returns
$this
Throws
InvalidArgumentException If the argument is not a string.
|
public
string
|
#
storagePath( )
Get the path to the storage directory.
Get the path to the storage directory.
Note that the storage space is outside of the public access.
Returns
string
|
public
Charcoal\App\AppConfig
|
#
setBaseUrl( Psr\Http\Message\UriInterface|string $uri )
Set the application's fully qualified base URL to the public web directory.
Set the application's fully qualified base URL to the public web directory.
Parameters
- $uri
- The base URI to the application's web directory.
Returns
|
public
Psr\Http\Message\UriInterface|null
|
#
baseUrl( )
Retrieve the application's fully qualified base URL to the public web directory.
Retrieve the application's fully qualified base URL to the public web directory.
Returns
Psr\Http\Message\UriInterface|null The base URI to the application's web directory.
|
public
Charcoal\App\AppConfig
|
#
setTimezone( string $timezone )
Set the application's default timezone.
Set the application's default timezone.
Parameters
- $timezone
- The timezone string.
Returns
Throws
InvalidArgumentException If the argument is not a string.
|
public
string
|
#
timezone( )
Retrieve the application's default timezone.
Retrieve the application's default timezone.
Will be used by the PHP date and date-time functions.
Returns
string
|
public
Charcoal\App\AppConfig
|
#
setProjectName( string|null $projectName )
Sets the project name.
Parameters
- $projectName
- The project name.
Returns
Throws
InvalidArgumentException If the project argument is not a string (or null).
|
public
string|null
|
|
public
Charcoal\App\AppConfig
|
#
setDevMode( boolean $devMode )
Parameters
- $devMode
- The "dev mode" flag.
Returns
|
public
boolean
|
|
public
Charcoal\App\AppConfig
|
#
setView( array $view )
Parameters
- $view
- The view configuration structure to set.
Returns
|
public
Charcoal\App\AppConfig
|
#
setRoutes( array $routes )
Parse the application's route configuration.
Parse the application's route configuration.
Parameters
- $routes
- The route configuration structure to set.
Returns
See
\Charcoal\Admin\Config::setRoutes() For a similar implementation.
|
public
array
|
|
public
Charcoal\App\AppConfig
|
#
setRoutables( array $routables )
Parameters
- $routables
- The routable configuration structure to set.
Returns
|
public
array
|
|
public
Charcoal\App\AppConfig
|
#
setHandlers( array $handlers )
Define custom response and error handlers.
Define custom response and error handlers.
Slim provides five standard handlers:
- "foundHandler"
- "notFoundHandler"
- "notAllowedHandler"
- "errorHandler"
- "phpErrorHandler"
Parameters
- $handlers
- The handlers configuration structure to set.
Returns
|
public
array
|
|
public
Charcoal\App\AppConfig
|
#
setModules( array $modules )
Set the configuration modules.
Set the configuration modules.
The modules are defined in a key =>\Charcoal\App\Module\ModuleConfig structure.
Parameters
- $modules
- The module configuration structure to set.
Returns
|
public
array
|
|
public
Charcoal\App\AppConfig
|
|
public
Charcoal\App\Config\CacheConfig
|
#
cache( )
Get the application's global CacheConfig .
Get the application's global CacheConfig .
Returns
|
public
Charcoal\App\AppConfig
|
|
public
Charcoal\App\Config\LoggerConfig
|
#
logger( )
Get the application's global LoggerConfig
Get the application's global LoggerConfig
Returns
|
public
Config
|
#
setDatabases( array $databases )
Parameters
- $databases
- The avaiable databases config.
Returns
Config Chainable
|
public
array
|
#
databases( )
Returns
array
Throws
Exception If trying to access this method and no databases were set.
|
public
array
|
#
databaseConfig( string $ident )
Parameters
- $ident
- The ident of the database to return the configuration of.
Returns
array
Throws
InvalidArgumentException If the ident argument is not a string.
Exception If trying to access an invalid database.
|
public
Charcoal\App\AppConfig
|
#
setDefaultDatabase( string $defaultDatabase )
Parameters
- $defaultDatabase
- The default database ident.
Returns
Throws
InvalidArgumentException If the argument is not a string.
|
public
Charcoal\App\AppConfig
|
#
addDatabase( string $ident, array $config )
Parameters
- $ident
- The database ident.
- $config
- The database options.
Returns
Throws
InvalidArgumentException If the arguments are invalid.
|
public
mixed
|
#
defaultDatabase( )
Returns
mixed
Throws
Exception If trying to access this method before a setter.
|
public
Charcoal\App\AppConfig
|
|
public
Charcoal\App\Config\FilesystemConfig
|
#
filesystem( )
Get the application's global FilesystemConfig
Get the application's global FilesystemConfig
Returns
|