\phpDocumentorApplication

Application class for phpDocumentor.

Can be used as bootstrap when the run method is not invoked.

Summary

Methods
Properties
Constants
__construct()
configureLogger()
run()
$VERSION
No constants found
defineIniSettings()
setTimezone()
addLogging()
addEventDispatcher()
addCommandsForProjectNamespace()
addCommandsForPharNamespace()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$VERSION

$VERSION : string

Type

string — represents the version of phpDocumentor as stored in /VERSION

Methods

__construct()

__construct(\Composer\Autoload\ClassLoader  $autoloader = null, array  $values = array()) 

Initializes all components used by phpDocumentor.

Parameters

\Composer\Autoload\ClassLoader $autoloader
array $values

configureLogger()

configureLogger(\Monolog\Logger  $logger, integer  $level, string  $logPath = null) : void

Removes all logging handlers and replaces them with handlers that can write to the given logPath and level.

Parameters

\Monolog\Logger $logger

The logger instance that needs to be configured.

integer $level

The minimum level that will be written to the normal logfile; matches one of the constants in {@see \Monolog\Logger}.

string $logPath

The full path where the normal log file needs to be written.

run()

run(boolean  $interactive = false) : void

Run the application and if no command is provided, use project:run.

Parameters

boolean $interactive

Whether to run in interactive mode.

defineIniSettings()

defineIniSettings() : void

Adjust php.ini settings.

setTimezone()

setTimezone() : void

If the timezone is not set anywhere, set it to UTC.

This is done to prevent any warnings being outputted in relation to using date/time functions. What is checked is php.ini, and if the PHP version is prior to 5.4, the TZ environment variable.

addLogging()

addLogging() : void

Adds a logging provider to the container of phpDocumentor.

addEventDispatcher()

addEventDispatcher() : void

Adds the event dispatcher to phpDocumentor's container.

addCommandsForProjectNamespace()

addCommandsForProjectNamespace() : void

Adds the command to phpDocumentor that belong to the Project namespace.

addCommandsForPharNamespace()

addCommandsForPharNamespace() : void

Adds the command to phpDocumentor that belong to the Phar namespace.