Methods |
public
|
getName(): string
Get the name of the application
Get the name of the application
Implemented by
|
#
|
public
|
getVersion(bool $withRef = true): string
Get the version of the application, optionally including its commit
reference
Get the version of the application, optionally including its commit
reference
Implemented by
|
#
|
public
|
getVersionString(): string
Get the application's name, version and commit reference, followed by the
PHP version
Get the application's name, version and commit reference, followed by the
PHP version
Implemented by
|
#
|
public
|
getBasePath(): string
Get the application's base path
Get the application's base path
Implemented by
|
#
|
public
|
getCachePath(): string
Get a cache directory for the application
Get a cache directory for the application
Implemented by
|
#
|
public
|
getConfigPath(): string
Get a directory for configuration files created by the application
Get a directory for configuration files created by the application
Implemented by
|
#
|
public
|
getDataPath(): string
Get a data directory for the application
Get a data directory for the application
Implemented by
|
#
|
public
|
getLogPath(): string
Get a directory for the application's log files
Get a directory for the application's log files
Implemented by
|
#
|
public
|
getTempPath(): string
Get a directory for the application's temporary files
Get a directory for the application's temporary files
Implemented by
|
#
|
public
|
isRunningInProduction(): bool
Check if the application is running in a production environment
Check if the application is running in a production environment
Implemented by
|
#
|
public
|
hasOutputLog(): bool
Check if console output is being logged to the application's log
directory
Check if console output is being logged to the application's log
directory
Implemented by
|
#
|
public
|
logOutput(string|null $name = null, ?bool $debug = null): $this
Log console output to the application's log directory
Log console output to the application's log directory
Messages with levels between LEVEL_EMERGENCY and LEVEL_INFO are
written to <name>.log .
If $debug is true , or $debug is null and debug mode is enabled in
the environment, messages with levels between LEVEL_EMERGENCY and
LEVEL_DEBUG are also written to <name>.debug.log .
Parameters
$name |
If null , the name of the application is used.
|
Throws
Implemented by
|
#
|
public
|
hasHarRecorder(): bool
Check if the application's HTTP requests are being recorded
Check if the application's HTTP requests are being recorded
Returns true if {@see recordHar()} has been called, even if no
subsequent HTTP requests have been made.
Implemented by
|
#
|
public
|
recordHar(
string|null $name = null,
?string $creatorName = null,
?string $creatorVersion = null,
(Closure(): string)|string|null $uuid = null,
): $this
Record the application's HTTP requests to an HTTP Archive (HAR) file in
its log directory
Record the application's HTTP requests to an HTTP Archive (HAR) file in
its log directory
If any HTTP requests are made via {@see CurlerInterface} implementations,
they are recorded in <name>-<timestamp>-<uuid>.har .
Parameters
$name |
If null , the name of the application is used.
|
Throws
Implemented by
|
#
|
public
|
getHarFilename(): ?string
Get the name of the application's HTTP Archive (HAR) file if it exists
Get the name of the application's HTTP Archive (HAR) file if it exists
Returns null if {@see recordHar()} has been called but no HTTP requests
have been made.
Throws
Implemented by
|
#
|
public
|
hasCache(): bool
Check if a cache has been started for the application
Check if a cache has been started for the application
Implemented by
|
#
|
public
|
startCache(): $this
Start a cache for the application and make it the global cache
Start a cache for the application and make it the global cache
If the cache is filesystem-backed, it is started in the application's
cache directory.
Throws
LogicException |
if a cache has already been started for the
application.
|
Implemented by
|
#
|
public
|
stopCache(): $this
Stop the application's cache if started
Stop the application's cache if started
Implemented by
|
#
|
public
|
hasSync(): bool
Check if a sync entity store has been started for the application
Check if a sync entity store has been started for the application
Implemented by
|
#
|
public
|
startSync(): $this
Start a sync entity store for the application and make it the global sync
entity store
Start a sync entity store for the application and make it the global sync
entity store
If the entity store is filesystem-backed, it is started in the
application's data directory.
Throws
LogicException |
if a sync entity store has already been started
for the application.
|
Implemented by
|
#
|
public
|
stopSync(): $this
Stop the application's sync entity store if started
Stop the application's sync entity store if started
Implemented by
|
#
|
public
|
sync(string $prefix, string $uri, string $namespace, ?SyncNamespaceHelperInterface $helper = null): $this
Register a namespace for sync entities and their provider interfaces with
the application's sync entity store, starting…
Register a namespace for sync entities and their provider interfaces with
the application's sync entity store, starting it if necessary
Implemented by
|
#
|
public
|
getInitialWorkingDirectory(): string
Get the directory in which the application was started
Get the directory in which the application was started
Implemented by
|
#
|
public
|
setInitialWorkingDirectory(string $directory): $this
Set the directory in which the application was started
Set the directory in which the application was started
Implemented by
|
#
|
public
|
restoreWorkingDirectory(): $this
Change to the directory in which the application was started
Change to the directory in which the application was started
Implemented by
|
#
|
public
|
reportVersion(ConsoleInterface::LEVEL_* $level = ConsoleInterface::LEVEL_INFO): $this
Write the application's name, version and commit reference, followed by
the PHP version, to the console
Write the application's name, version and commit reference, followed by
the PHP version, to the console
Implemented by
|
#
|
public
|
reportResourceUsage(ConsoleInterface::LEVEL_* $level = ConsoleInterface::LEVEL_INFO): $this
Write a summary of the application's system resource usage to the console
Write a summary of the application's system resource usage to the console
Implemented by
|
#
|
public
|
reportMetrics(
ConsoleInterface::LEVEL_* $level = ConsoleInterface::LEVEL_INFO,
bool $includeRunningTimers = true,
string[]|string|null $groups = null,
?int $limit = 10,
): $this
Write a summary of the application's runtime performance metrics to the
console
Write a summary of the application's runtime performance metrics to the
console
Parameters
$groups |
If null or ["*"] , all metrics are
reported, otherwise only metrics in the given groups are reported.
|
Implemented by
|
#
|
public
|
registerShutdownReport(
ConsoleInterface::LEVEL_* $level = ConsoleInterface::LEVEL_INFO,
bool $includeResourceUsage = true,
bool $includeRunningTimers = true,
string[]|string|null $groups = null,
?int $limit = 10,
): $this
Write a summary of the application's runtime performance metrics and
system resource usage to the console when it…
Write a summary of the application's runtime performance metrics and
system resource usage to the console when it terminates
Parameters
$groups |
If null or ["*"] , all metrics are
reported, otherwise only metrics in the given groups are reported.
|
Implemented by
|
#
|