PHP Класс N98\Magento\Command\AbstractMagentoCommand

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

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

Свойство Тип Описание
$_deprecatedAlias array
$_magentoEnterprise boolean
$_magentoMajorVersion integer
$_magentoRootFolder string
$_websiteCodeMap array

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

Метод Описание
detectMagento ( Symfony\Component\Console\Output\OutputInterface $output, boolean $silent = true ) Search for magento root folder
run ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer

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

Метод Описание
_getModel ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract Magento 1 / 2 switches
_getResourceModel ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract Magento 1 / 2 switches
_getResourceSingleton ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract Magento 1 / 2 switches
_getWebsiteCodeById ( integer $websiteId ) : string
_getWebsiteIdByCode ( string $websiteCode ) : integer
_parseBoolOption ( string $value ) : boolean
addDeprecatedAlias ( string $alias, string $message ) : AbstractMagentoCommand
askForArrayEntry ( array $entries, Symfony\Component\Console\Output\OutputInterface $output, string $question ) : mixed
checkDeprecatedAliases ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
checkRepository ( Composer\Package\PackageInterface $package, string $targetFolder ) brings locally cached repository up to date if it is missing the requested tag
chooseInstallationFolder ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
createComposerPackageByConfig ( array | Composer\Package\PackageInterface $config ) : Composer\Package\CompletePackage
downloadByComposerConfig ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, array | Composer\Package\PackageInterface $config, string $targetFolder, boolean $preferSource = true ) : Composer\Package\CompletePackage
formatActive ( string $value ) : string
getArgumentMessage ( string $argument, string $message = null ) : string
getCommandConfig ( string | null $commandClass = null ) : array
getComposer ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : Composer\Composer obtain composer
getComposerDownloadManager ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : Composer\Downloader\DownloadManager
getCoreHelper ( ) : Mage_Core_Helper_Data
getOrAskForArgument ( string $argument, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, string $message = null ) : string
initMagento ( boolean $soft = false ) : boolean Bootstrap magento shop
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) Initializes the command just after the input has been validated.
isSourceTypeRepository ( string $type ) : boolean
normalizePath ( string $path ) : string normalize paths on windows / cygwin / msysgit
requireEnterprise ( Symfony\Component\Console\Output\OutputInterface $output ) Die if not Enterprise
writeSection ( Symfony\Component\Console\Output\OutputInterface $output, string $text, string $style = 'bg=blue;fg=white' )

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

Метод Описание
_initWebsites ( )

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

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

Magento 1 / 2 switches
protected _getModel ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract
$mage1code string Magento 1 class code
$mage2class string Magento 2 class name
Результат Mage_Core_Model_Abstract

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

Magento 1 / 2 switches
protected _getResourceModel ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract
$mage1code string Magento 1 class code
$mage2class string Magento 2 class name
Результат Mage_Core_Model_Abstract

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

Magento 1 / 2 switches
protected _getResourceSingleton ( string $mage1code, string $mage2class ) : Mage_Core_Model_Abstract
$mage1code string Magento 1 class code
$mage2class string Magento 2 class name
Результат Mage_Core_Model_Abstract

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

protected _getWebsiteCodeById ( integer $websiteId ) : string
$websiteId integer
Результат string

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

protected _getWebsiteIdByCode ( string $websiteCode ) : integer
$websiteCode string
Результат integer

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

protected _parseBoolOption ( string $value ) : boolean
$value string
Результат boolean

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

protected addDeprecatedAlias ( string $alias, string $message ) : AbstractMagentoCommand
$alias string
$message string
Результат AbstractMagentoCommand

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

protected askForArrayEntry ( array $entries, Symfony\Component\Console\Output\OutputInterface $output, string $question ) : mixed
$entries array zero-indexed array of entries (represented by strings) to select from
$output Symfony\Component\Console\Output\OutputInterface
$question string
Результат mixed

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

protected checkDeprecatedAliases ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

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

brings locally cached repository up to date if it is missing the requested tag
protected checkRepository ( Composer\Package\PackageInterface $package, string $targetFolder )
$package Composer\Package\PackageInterface
$targetFolder string

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

protected chooseInstallationFolder ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

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

protected createComposerPackageByConfig ( array | Composer\Package\PackageInterface $config ) : Composer\Package\CompletePackage
$config array | Composer\Package\PackageInterface
Результат Composer\Package\CompletePackage

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

Search for magento root folder
public detectMagento ( Symfony\Component\Console\Output\OutputInterface $output, boolean $silent = true )
$output Symfony\Component\Console\Output\OutputInterface
$silent boolean print debug messages

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

protected downloadByComposerConfig ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, array | Composer\Package\PackageInterface $config, string $targetFolder, boolean $preferSource = true ) : Composer\Package\CompletePackage
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
$config array | Composer\Package\PackageInterface
$targetFolder string
$preferSource boolean
Результат Composer\Package\CompletePackage

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

protected formatActive ( string $value ) : string
$value string
Результат string

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

protected getArgumentMessage ( string $argument, string $message = null ) : string
$argument string
$message string [optional]
Результат string

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

protected getCommandConfig ( string | null $commandClass = null ) : array
$commandClass string | null
Результат array

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

obtain composer
protected getComposer ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : Composer\Composer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат Composer\Composer

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

protected getComposerDownloadManager ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : Composer\Downloader\DownloadManager
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат Composer\Downloader\DownloadManager

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

protected getCoreHelper ( ) : Mage_Core_Helper_Data
Результат Mage_Core_Helper_Data

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

protected getOrAskForArgument ( string $argument, Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, string $message = null ) : string
$argument string
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
$message string
Результат string

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

Bootstrap magento shop
protected initMagento ( boolean $soft = false ) : boolean
$soft boolean
Результат boolean

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

This is mainly useful when a lot of commands extends one main command where some things need to be initialized based on the input arguments and options.
protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface An InputInterface instance
$output Symfony\Component\Console\Output\OutputInterface An OutputInterface instance

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

protected isSourceTypeRepository ( string $type ) : boolean
$type string
Результат boolean

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

when using a path value that has been created in a cygwin shell but then PHP uses it inside a cmd shell it needs to be filtered.
protected normalizePath ( string $path ) : string
$path string
Результат string

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

Die if not Enterprise
protected requireEnterprise ( Symfony\Component\Console\Output\OutputInterface $output )
$output Symfony\Component\Console\Output\OutputInterface

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

public run ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат integer

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

protected writeSection ( Symfony\Component\Console\Output\OutputInterface $output, string $text, string $style = 'bg=blue;fg=white' )
$output Symfony\Component\Console\Output\OutputInterface
$text string
$style string

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

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

protected array $_deprecatedAlias
Результат array

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

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

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

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

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

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

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

protected array $_websiteCodeMap
Результат array