Property | Type | Description | |
---|---|---|---|
$booted | boolean | ||
$configManager | PPI\Framework\Config\ConfigManager | Configuration loader. | |
$debug | boolean | ||
$environment | string | Application environment: "dev|development" vs "prod|production". | |
$errorReportingLevel | |||
$logger | Psr\Log\LoggerInterface | ||
$matchedRoute | null | array | ||
$moduleManager | Zend\ModuleManager\ModuleManager | The Module Manager. | |
$name | string | ||
$resolver | |||
$rootDir | null | string | Path to the application root dir aka the "app" directory. | |
$serviceManager | PPI\Framework\ServiceManager\ServiceManager | Service Manager. | |
$startTime | float | Unix timestamp with microseconds. |
Method | Description | |
---|---|---|
__clone ( ) | ||
__construct ( array $options = [] ) | App constructor. | |
boot ( ) | Run the boot process, load our modules and their dependencies. | |
dispatch ( PPI\Framework\Http\Request $request, PPI\Framework\Http\Response $response ) : PPI\Framework\Http\Response | Decide on a route to use and dispatch our module's controller action. | |
getCacheDir ( ) : string | Gets the cache directory. | |
getCharset ( ) : string | Gets the charset of the application. | |
getConfig ( ) : array | object | Returns the application configuration. | |
getConfigManager ( ) : PPI\Framework\Config\ConfigManager | Returns a ConfigManager instance. | |
getContainer ( ) : null | PPI\Framework\ServiceManager\ServiceManager | ||
getEnvironment ( ) : string | Get the environment mode the application is in. | |
getLogDir ( ) : string | Gets the log directory. | |
getModuleManager ( ) : Zend\ModuleManager\ModuleManager | Returns the Module Manager. | |
getModules ( ) : array | Get an array of the loaded modules. | |
getName ( ) : string | Gets the name of the application. | |
getRootDir ( ) : string | Gets the application root dir. | |
getServiceManager ( ) : PPI\Framework\ServiceManager\ServiceManager | Get the service manager. | |
getStartTime ( ) : integer | Gets the request start time (not available if debug is disabled). | |
getVersion ( ) : string | Gets the version of the application. | |
isDebug ( ) : boolean | Checks if debug mode is enabled. | |
isEnvironment ( $env ) : boolean | ||
loadConfig ( $resource, null $type = null ) : |
Loads a configuration file or PHP array. | |
locateResource ( string $name, string $dir = null, boolean $first = true ) : string | array | ||
run ( PPI\Framework\Http\Request $request = null, PPI\Framework\Http\Response $response = null ) : PPI\Framework\Http\Response | Run the application and send the response. | |
serialize ( ) : string | ||
setSymfonyKernel ( Symfony\Component\HttpKernel\KernelInterface $kernel ) | ||
unserialize ( $data ) |
Method | Description | |
---|---|---|
buildServiceManager ( ) : PPI\Framework\ServiceManager\ServiceManager | Creates and initializes a ServiceManager instance. | |
getAppParameters ( ) : array | Returns the application parameters. | |
getEnvParameters ( ) : array | Gets the environment parameters. | |
handleRouting ( PPI\Framework\Http\Request $request ) : array | Perform the matching of a route and return a set of routing parameters if a valid one is found. | |
log ( mixed $level, string $message, array $context = [] ) | Logs with an arbitrary level. |
public __construct ( array $options = [] ) | ||
$options | array |
public boot ( ) |
protected buildServiceManager ( ) : PPI\Framework\ServiceManager\ServiceManager | ||
return | PPI\Framework\ServiceManager\ServiceManager | The compiled service manager |
public dispatch ( PPI\Framework\Http\Request $request, PPI\Framework\Http\Response $response ) : PPI\Framework\Http\Response | ||
$request | PPI\Framework\Http\Request | |
$response | PPI\Framework\Http\Response | |
return | PPI\Framework\Http\Response |
protected getAppParameters ( ) : array | ||
return | array | An array of application parameters |
public getCacheDir ( ) : string | ||
return | string | The cache directory |
public getCharset ( ) : string | ||
return | string | The charset |
public getConfigManager ( ) : PPI\Framework\Config\ConfigManager | ||
return | PPI\Framework\Config\ConfigManager |
public getContainer ( ) : null | PPI\Framework\ServiceManager\ServiceManager | ||
return | null | PPI\Framework\ServiceManager\ServiceManager |
protected getEnvParameters ( ) : array | ||
return | array | An array of parameters |
public getEnvironment ( ) : string | ||
return | string | The current environment |
public getModuleManager ( ) : Zend\ModuleManager\ModuleManager | ||
return | Zend\ModuleManager\ModuleManager |
public getModules ( ) : array | ||
return | array | An array of Module objects, keyed by module name |
public getRootDir ( ) : string | ||
return | string | The application root dir |
public getServiceManager ( ) : PPI\Framework\ServiceManager\ServiceManager | ||
return | PPI\Framework\ServiceManager\ServiceManager |
public getStartTime ( ) : integer | ||
return | integer | The request start timestamp |
public getVersion ( ) : string | ||
return | string | The application version |
protected handleRouting ( PPI\Framework\Http\Request $request ) : array | ||
$request | PPI\Framework\Http\Request | |
return | array |
public loadConfig ( $resource, null $type = null ) : |
||
$resource | ||
$type | null | |
return | The current instance |
public locateResource ( string $name, string $dir = null, boolean $first = true ) : string | array | ||
$name | string | A resource name to locate |
$dir | string | A directory where to look for the resource first |
$first | boolean | Whether to return the first path or paths for all matching bundles |
return | string | array | The absolute path of the resource or an array if $first is false |
public run ( PPI\Framework\Http\Request $request = null, PPI\Framework\Http\Response $response = null ) : PPI\Framework\Http\Response | ||
$request | PPI\Framework\Http\Request | |
$response | PPI\Framework\Http\Response | |
return | PPI\Framework\Http\Response |
public setSymfonyKernel ( Symfony\Component\HttpKernel\KernelInterface $kernel ) | ||
$kernel | Symfony\Component\HttpKernel\KernelInterface |
protected ConfigManager,PPI\Framework\Config $configManager | ||
return | PPI\Framework\Config\ConfigManager |
protected string $environment | ||
return | string |
protected LoggerInterface,Psr\Log $logger | ||
return | Psr\Log\LoggerInterface |
protected ModuleManager,Zend\ModuleManager $moduleManager | ||
return | Zend\ModuleManager\ModuleManager |
protected ControllerResolver,PPI\Framework\Module\Controller $resolver | ||
return |
protected ServiceManager,PPI\Framework\ServiceManager $serviceManager | ||
return | PPI\Framework\ServiceManager\ServiceManager |
protected float $startTime | ||
return | float |