PHP Класс N98\Magento\Application

Наследование: extends Symfony\Component\Console\Application
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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

Открытые методы

Метод Описание
__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 )

Защищенные методы

Метод Описание
_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.

Приватные методы

Метод Описание
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

Описание методов

__construct() публичный Метод

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

_addOutputStyles() защищенный Метод

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

_checkRootDirOption() защищенный Метод

protected _checkRootDirOption ( Symfony\Component\Console\Input\InputInterface $input ) : string
$input Symfony\Component\Console\Input\InputInterface
Результат string

_checkSkipConfigOption() защищенный Метод

Устаревший: 1.97.27
protected _checkSkipConfigOption ( Symfony\Component\Console\Input\InputInterface $input ) : boolean
$input Symfony\Component\Console\Input\InputInterface
Результат boolean

_initMagento1() защищенный Метод

protected _initMagento1 ( boolean $soft = false ) : void
$soft boolean
Результат void

_initMagento2() защищенный Метод

protected _initMagento2 ( ) : void
Результат void

add() публичный Метод

Override standard command registration. We want alias support.
public add ( Command $command ) : Command
$command Symfony\Component\Console\Command\Command
Результат Symfony\Component\Console\Command\Command

checkConfigCommandAlias() защищенный Метод

protected checkConfigCommandAlias ( Symfony\Component\Console\Input\InputInterface $input ) : Symfony\Component\Console\Input\ArgvInput | Symfony\Component\Console\Input\InputInterface
$input Symfony\Component\Console\Input\InputInterface
Результат Symfony\Component\Console\Input\ArgvInput | Symfony\Component\Console\Input\InputInterface

checkVarDir() публичный Метод

public checkVarDir ( Symfony\Component\Console\Output\OutputInterface $output ) : null | false
$output Symfony\Component\Console\Output\OutputInterface
Результат null | false

detectMagento() публичный Метод

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]
Результат void

doRun() публичный Метод

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
Результат integer 0 if everything went fine, or an error code

getAutoloader() публичный Метод

public getAutoloader ( ) : Composer\Autoload\ClassLoader
Результат Composer\Autoload\ClassLoader

getConfig() публичный Метод

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)
Результат array | null

getConfigurationLoader() публичный Метод

public getConfigurationLoader ( array $initConfig, Symfony\Component\Console\Output\OutputInterface $output ) : ConfigurationLoader
$initConfig array
$output Symfony\Component\Console\Output\OutputInterface
Результат N98\Magento\Application\ConfigurationLoader

getDefaultInputDefinition() защищенный Метод

protected getDefaultInputDefinition ( ) : Symfony\Component\Console\Input\InputDefinition
Результат Symfony\Component\Console\Input\InputDefinition

getDispatcher() публичный Метод

public getDispatcher ( ) : EventDispatcher
Результат Symfony\Component\EventDispatcher\EventDispatcher

getHelp() публичный Метод

public getHelp ( ) : string
Результат string

getLongVersion() публичный Метод

public getLongVersion ( )

getMagentoMajorVersion() публичный Метод

public getMagentoMajorVersion ( ) : integer
Результат integer

getMagentoRootFolder() публичный Метод

public getMagentoRootFolder ( ) : string
Результат string

hasCustomCommands() защищенный Метод

protected hasCustomCommands ( ) : boolean
Результат boolean

init() публичный Метод

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]
Результат void

initMagento() публичный Метод

Loads and initializes the Magento application
public initMagento ( boolean $soft = false ) : boolean
$soft boolean
Результат boolean false if magento root folder is not set, true otherwise

isCommandDisabled() защищенный Метод

protected isCommandDisabled ( string $class ) : boolean
$class string
Результат boolean

isMagentoEnterprise() публичный Метод

public isMagentoEnterprise ( ) : boolean
Результат boolean

isMagerunStopFileFound() публичный Метод

public isMagerunStopFileFound ( ) : boolean
Результат boolean

isPharMode() публичный Метод

public isPharMode ( ) : boolean
Результат boolean

registerConfigCommandAlias() защищенный Метод

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

registerCustomAutoloaders() защищенный Метод

Adds autoloader prefixes from user's config

registerCustomCommands() защищенный Метод

protected registerCustomCommands ( ) : void
Результат void

registerEventSubscribers() защищенный Метод

protected registerEventSubscribers ( ) : void
Результат void

registerHelpers() защищенный Метод

Add own helpers to helperset.
protected registerHelpers ( ) : void
Результат void

reinit() публичный Метод

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 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]
Результат integer

setAutoloader() публичный Метод

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

setConfig() публичный Метод

public setConfig ( array $config )
$config array

setConfigurationLoader() публичный Метод

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

setMagentoRootFolder() публичный Метод

public setMagentoRootFolder ( string $magentoRootFolder )
$magentoRootFolder string

setPharMode() публичный Метод

public setPharMode ( boolean $mode )
$mode boolean

Описание свойств

$_directRootDir защищенное свойство

If root dir is set by root-dir option this flag is true
protected bool $_directRootDir
Результат boolean

$_isInitialized защищенное свойство

protected bool $_isInitialized
Результат boolean

$_isPharMode защищенное свойство

protected bool $_isPharMode
Результат boolean

$_magento2EntryPoint защищенное свойство

protected EntryPoint,Magento\Mtf\EntryPoint $_magento2EntryPoint
Результат Magento\Mtf\EntryPoint\EntryPoint

$_magentoDetected защищенное свойство

protected bool $_magentoDetected
Результат boolean

$_magentoEnterprise защищенное свойство

protected bool $_magentoEnterprise
Результат boolean

$_magentoMajorVersion защищенное свойство

protected int $_magentoMajorVersion
Результат integer

$_magentoRootFolder защищенное свойство

protected string $_magentoRootFolder
Результат string

$_magerunStopFileFolder защищенное свойство

protected string $_magerunStopFileFolder
Результат string

$_magerunStopFileFound защищенное свойство

protected bool $_magerunStopFileFound
Результат boolean

$autoloader защищенное свойство

protected ClassLoader,Composer\Autoload $autoloader
Результат Composer\Autoload\ClassLoader

$config защищенное свойство

protected Config,N98\Magento\Application $config
Результат N98\Magento\Application\Config

$dispatcher защищенное свойство

protected EventDispatcher,Symfony\Component\EventDispatcher $dispatcher
Результат Symfony\Component\EventDispatcher\EventDispatcher