Overview

Namespaces

  • Evenement
  • None
  • Peridot
    • Console
    • Core
    • Reporter
    • Runner
    • Scope
    • Test
  • Symfony
    • Component
      • Console
        • Command
        • Descriptor
        • Event
        • Exception
        • Formatter
        • Helper
        • Input
        • Logger
        • Output
        • Question
        • Style
        • Tester
        • Tests
          • Command
          • Descriptor
          • Fixtures
          • Formatter
          • Helper
          • Input
          • Logger
          • Output
          • Style
          • Tester

Classes

  • Application
  • CliOptionParser
  • Command
  • ConfigurationReader
  • Environment
  • InputDefinition
  • Version
  • Overview
  • Namespace
  • Class

Class Environment

Environment is responsible for creating necessary objects and conditions for Peridot to run. It creates the event emitter, input definition, and includes user configuration from the Peridot configuration file.

Peridot\Console\Environment uses Peridot\Core\HasEventEmitterTrait
Namespace: Peridot\Console
Package: Peridot\Console
Located at Console/Environment.php
Methods summary
public
# __construct( Peridot\Console\InputDefinition $definition, Evenement\EventEmitterInterface $emitter, array $options )

Parameters

$definition
$emitter
$options
public boolean
# load( string $configuration )

Attempt to load a user configuration file into the Peridot environment

Attempt to load a user configuration file into the Peridot environment

Parameters

$configuration
The default configuration path

Returns

boolean
public Peridot\Console\InputDefinition
# getDefinition( )

Return the InputDefinition used to define the available Peridot options and arguments

Return the InputDefinition used to define the available Peridot options and arguments

Returns

Peridot\Console\InputDefinition
protected boolean
# loadConfiguration( $configuration )

Load configuration

Load configuration

Parameters

$configuration

Returns

boolean
protected
# optionIsFile( $key )

Determine if the environment option identified by $key is a file.

Determine if the environment option identified by $key is a file.

Parameters

$key
protected boolean
# includeConfiguration( $configuration )

Include the configuration file used to setup the peridot environment

Include the configuration file used to setup the peridot environment

Parameters

$configuration

Returns

boolean
protected boolean
# wasGivenAConfigurationPath( )

Returns true if the Environment was given a configuration path.

Returns true if the Environment was given a configuration path.

Returns

boolean
protected
# initializeContext( Evenement\EventEmitterInterface $emitter )

Initialize the Context with the same event emitter as the Environment.

Initialize the Context with the same event emitter as the Environment.

Parameters

$emitter
Methods used from Peridot\Core\HasEventEmitterTrait
getEventEmitter(), setEventEmitter()
Properties summary
protected Peridot\Console\InputDefinition $definition
#
protected array $options

Environment options

Environment options

#
Properties used from Peridot\Core\HasEventEmitterTrait
$eventEmitter
Peridot API documentation generated by ApiGen