PHP Class N98\Magento\Application

Inheritance: extends Symfony\Component\Console\Application
Afficher le fichier Open project: netz98/n98-magerun Class Usage Examples

Protected Properties

Свойство Type Description
$_directRootDir boolean If root dir is set by root-dir option this flag is true
$_isInitialized boolean
$_isPharMode boolean
$_magento2EntryPoint Magento\Mtf\EntryPoint\EntryPoint
$_magentoDetected boolean
$_magentoEnterprise boolean
$_magentoMajorVersion integer
$_magentoRootFolder string
$_magerunStopFileFolder string
$_magerunStopFileFound boolean
$autoloader Composer\Autoload\ClassLoader
$config N98\Magento\Application\Config
$dispatcher Symfony\Component\EventDispatcher\EventDispatcher

Méthodes publiques

Méthode Description
__construct ( Composer\Autoload\ClassLoader $autoloader = null )
add ( Command $command ) : Command Override standard command registration. We want alias support.
checkVarDir ( Symfony\Component\Console\Output\OutputInterface $output ) : null | false
detectMagento ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : void Search for magento root folder
doRun ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer Runs the current application with possible command aliases
getAutoloader ( ) : Composer\Autoload\ClassLoader
getConfig ( string | integer $key = null ) : array | null Get config array
getConfigurationLoader ( array $initConfig, Symfony\Component\Console\Output\OutputInterface $output ) : ConfigurationLoader
getDispatcher ( ) : EventDispatcher
getHelp ( ) : string
getLongVersion ( )
getMagentoMajorVersion ( ) : integer
getMagentoRootFolder ( ) : string
init ( array $initConfig = [], Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : void
initMagento ( boolean $soft = false ) : boolean Loads and initializes the Magento application
isMagentoEnterprise ( ) : boolean
isMagerunStopFileFound ( ) : boolean
isPharMode ( ) : boolean
reinit ( array $initConfig = [], Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null )
run ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : integer
setAutoloader ( Composer\Autoload\ClassLoader $autoloader )
setConfig ( array $config )
setConfigurationLoader ( ConfigurationLoader $configurationLoader )
setMagentoRootFolder ( string $magentoRootFolder )
setPharMode ( boolean $mode )

Méthodes protégées

Méthode Description
_addOutputStyles ( Symfony\Component\Console\Output\OutputInterface $output )
_checkRootDirOption ( Symfony\Component\Console\Input\InputInterface $input ) : string
_checkSkipConfigOption ( Symfony\Component\Console\Input\InputInterface $input ) : boolean
_initMagento1 ( boolean $soft = false ) : void
_initMagento2 ( ) : void
checkConfigCommandAlias ( Symfony\Component\Console\Input\InputInterface $input ) : Symfony\Component\Console\Input\ArgvInput | Symfony\Component\Console\Input\InputInterface
getDefaultInputDefinition ( ) : Symfony\Component\Console\Input\InputDefinition
hasCustomCommands ( ) : boolean
isCommandDisabled ( string $class ) : boolean
registerConfigCommandAlias ( Command $command )
registerCustomAutoloaders ( ) Adds autoloader prefixes from user's config
registerCustomCommands ( ) : void
registerEventSubscribers ( ) : void
registerHelpers ( ) : void Add own helpers to helperset.

Private Methods

Méthode Description
outputMagerunCompatibilityNotice ( string $version ) Show a hint that this is Magento incompatible with Magerun and how to obtain the correct Magerun for it
requireOnce ( string $path ) use require-once inside a function with it's own variable scope w/o any other variables and $this unbound.
setRootDir ( string $path ) Set root dir (chdir()) of magento directory

Method Details

__construct() public méthode

public __construct ( Composer\Autoload\ClassLoader $autoloader = null )
$autoloader Composer\Autoload\ClassLoader

_addOutputStyles() protected méthode

protected _addOutputStyles ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

_checkRootDirOption() protected méthode

protected _checkRootDirOption ( Symfony\Component\Console\Input\InputInterface $input ) : string
$input Symfony\Component\Console\Input\InputInterface
Résultat string

_checkSkipConfigOption() protected méthode

Deprecation: 1.97.27
protected _checkSkipConfigOption ( Symfony\Component\Console\Input\InputInterface $input ) : boolean
$input Symfony\Component\Console\Input\InputInterface
Résultat boolean

_initMagento1() protected méthode

protected _initMagento1 ( boolean $soft = false ) : void
$soft boolean
Résultat void

_initMagento2() protected méthode

protected _initMagento2 ( ) : void
Résultat void

add() public méthode

Override standard command registration. We want alias support.
public add ( Command $command ) : Command
$command Symfony\Component\Console\Command\Command
Résultat Symfony\Component\Console\Command\Command

checkConfigCommandAlias() protected méthode

protected checkConfigCommandAlias ( Symfony\Component\Console\Input\InputInterface $input ) : Symfony\Component\Console\Input\ArgvInput | Symfony\Component\Console\Input\InputInterface
$input Symfony\Component\Console\Input\InputInterface
Résultat Symfony\Component\Console\Input\ArgvInput | Symfony\Component\Console\Input\InputInterface

checkVarDir() public méthode

public checkVarDir ( Symfony\Component\Console\Output\OutputInterface $output ) : null | false
$output Symfony\Component\Console\Output\OutputInterface
Résultat null | false

detectMagento() public méthode

Search for magento root folder
public detectMagento ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : void
$input Symfony\Component\Console\Input\InputInterface [optional]
$output Symfony\Component\Console\Output\OutputInterface [optional]
Résultat void

doRun() public méthode

Runs the current application with possible command aliases
public doRun ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer
$input Symfony\Component\Console\Input\InputInterface An Input instance
$output Symfony\Component\Console\Output\OutputInterface An Output instance
Résultat integer 0 if everything went fine, or an error code

getAutoloader() public méthode

public getAutoloader ( ) : Composer\Autoload\ClassLoader
Résultat Composer\Autoload\ClassLoader

getConfig() public méthode

Specify one key per parameter to traverse the config. Then returns null if the path of the key(s) can not be obtained.
public getConfig ( string | integer $key = null ) : array | null
$key string | integer ... (optional)
Résultat array | null

getConfigurationLoader() public méthode

public getConfigurationLoader ( array $initConfig, Symfony\Component\Console\Output\OutputInterface $output ) : ConfigurationLoader
$initConfig array
$output Symfony\Component\Console\Output\OutputInterface
Résultat N98\Magento\Application\ConfigurationLoader

getDefaultInputDefinition() protected méthode

protected getDefaultInputDefinition ( ) : Symfony\Component\Console\Input\InputDefinition
Résultat Symfony\Component\Console\Input\InputDefinition

getDispatcher() public méthode

public getDispatcher ( ) : EventDispatcher
Résultat Symfony\Component\EventDispatcher\EventDispatcher

getHelp() public méthode

public getHelp ( ) : string
Résultat string

getLongVersion() public méthode

public getLongVersion ( )

getMagentoMajorVersion() public méthode

public getMagentoMajorVersion ( ) : integer
Résultat integer

getMagentoRootFolder() public méthode

public getMagentoRootFolder ( ) : string
Résultat string

hasCustomCommands() protected méthode

protected hasCustomCommands ( ) : boolean
Résultat boolean

init() public méthode

public init ( array $initConfig = [], Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : void
$initConfig array [optional]
$input Symfony\Component\Console\Input\InputInterface [optional]
$output Symfony\Component\Console\Output\OutputInterface [optional]
Résultat void

initMagento() public méthode

Loads and initializes the Magento application
public initMagento ( boolean $soft = false ) : boolean
$soft boolean
Résultat boolean false if magento root folder is not set, true otherwise

isCommandDisabled() protected méthode

protected isCommandDisabled ( string $class ) : boolean
$class string
Résultat boolean

isMagentoEnterprise() public méthode

public isMagentoEnterprise ( ) : boolean
Résultat boolean

isMagerunStopFileFound() public méthode

public isMagerunStopFileFound ( ) : boolean
Résultat boolean

isPharMode() public méthode

public isPharMode ( ) : boolean
Résultat boolean

registerConfigCommandAlias() protected méthode

protected registerConfigCommandAlias ( Command $command )
$command Symfony\Component\Console\Command\Command

registerCustomAutoloaders() protected méthode

Adds autoloader prefixes from user's config

registerCustomCommands() protected méthode

protected registerCustomCommands ( ) : void
Résultat void

registerEventSubscribers() protected méthode

protected registerEventSubscribers ( ) : void
Résultat void

registerHelpers() protected méthode

Add own helpers to helperset.
protected registerHelpers ( ) : void
Résultat void

reinit() public méthode

public reinit ( array $initConfig = [], Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null )
$initConfig array [optional]
$input Symfony\Component\Console\Input\InputInterface [optional]
$output Symfony\Component\Console\Output\OutputInterface [optional]

run() public méthode

public run ( Symfony\Component\Console\Input\InputInterface $input = null, Symfony\Component\Console\Output\OutputInterface $output = null ) : integer
$input Symfony\Component\Console\Input\InputInterface [optional]
$output Symfony\Component\Console\Output\OutputInterface [optional]
Résultat integer

setAutoloader() public méthode

public setAutoloader ( Composer\Autoload\ClassLoader $autoloader )
$autoloader Composer\Autoload\ClassLoader

setConfig() public méthode

public setConfig ( array $config )
$config array

setConfigurationLoader() public méthode

public setConfigurationLoader ( ConfigurationLoader $configurationLoader )
$configurationLoader N98\Magento\Application\ConfigurationLoader

setMagentoRootFolder() public méthode

public setMagentoRootFolder ( string $magentoRootFolder )
$magentoRootFolder string

setPharMode() public méthode

public setPharMode ( boolean $mode )
$mode boolean

Property Details

$_directRootDir protected_oe property

If root dir is set by root-dir option this flag is true
protected bool $_directRootDir
Résultat boolean

$_isInitialized protected_oe property

protected bool $_isInitialized
Résultat boolean

$_isPharMode protected_oe property

protected bool $_isPharMode
Résultat boolean

$_magento2EntryPoint protected_oe property

protected EntryPoint,Magento\Mtf\EntryPoint $_magento2EntryPoint
Résultat Magento\Mtf\EntryPoint\EntryPoint

$_magentoDetected protected_oe property

protected bool $_magentoDetected
Résultat boolean

$_magentoEnterprise protected_oe property

protected bool $_magentoEnterprise
Résultat boolean

$_magentoMajorVersion protected_oe property

protected int $_magentoMajorVersion
Résultat integer

$_magentoRootFolder protected_oe property

protected string $_magentoRootFolder
Résultat string

$_magerunStopFileFolder protected_oe property

protected string $_magerunStopFileFolder
Résultat string

$_magerunStopFileFound protected_oe property

protected bool $_magerunStopFileFound
Résultat boolean

$autoloader protected_oe property

protected ClassLoader,Composer\Autoload $autoloader
Résultat Composer\Autoload\ClassLoader

$config protected_oe property

protected Config,N98\Magento\Application $config
Résultat N98\Magento\Application\Config

$dispatcher protected_oe property

protected EventDispatcher,Symfony\Component\EventDispatcher $dispatcher
Résultat Symfony\Component\EventDispatcher\EventDispatcher