PHP Class N98\Magento\Command\AbstractMagentoCommand

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

Protected Properties

Свойство Type Description
$_deprecatedAlias array
$_magentoEnterprise boolean
$_magentoMajorVersion integer
$_magentoRootFolder string
$_websiteCodeMap array

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
_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' )

Private Methods

Méthode Description
_initWebsites ( )

Method Details

_getModel() protected méthode

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
Résultat Mage_Core_Model_Abstract

_getResourceModel() protected méthode

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
Résultat Mage_Core_Model_Abstract

_getResourceSingleton() protected méthode

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
Résultat Mage_Core_Model_Abstract

_getWebsiteCodeById() protected méthode

protected _getWebsiteCodeById ( integer $websiteId ) : string
$websiteId integer
Résultat string

_getWebsiteIdByCode() protected méthode

protected _getWebsiteIdByCode ( string $websiteCode ) : integer
$websiteCode string
Résultat integer

_parseBoolOption() protected méthode

protected _parseBoolOption ( string $value ) : boolean
$value string
Résultat boolean

addDeprecatedAlias() protected méthode

protected addDeprecatedAlias ( string $alias, string $message ) : AbstractMagentoCommand
$alias string
$message string
Résultat AbstractMagentoCommand

askForArrayEntry() protected méthode

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
Résultat mixed

checkDeprecatedAliases() protected méthode

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() protected méthode

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 méthode

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 méthode

protected createComposerPackageByConfig ( array | Composer\Package\PackageInterface $config ) : Composer\Package\CompletePackage
$config array | Composer\Package\PackageInterface
Résultat Composer\Package\CompletePackage

detectMagento() public méthode

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 méthode

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
Résultat Composer\Package\CompletePackage

formatActive() protected méthode

protected formatActive ( string $value ) : string
$value string
Résultat string

getArgumentMessage() protected méthode

protected getArgumentMessage ( string $argument, string $message = null ) : string
$argument string
$message string [optional]
Résultat string

getCommandConfig() protected méthode

protected getCommandConfig ( string | null $commandClass = null ) : array
$commandClass string | null
Résultat array

getComposer() protected méthode

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
Résultat Composer\Composer

getComposerDownloadManager() protected méthode

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
Résultat Composer\Downloader\DownloadManager

getCoreHelper() protected méthode

protected getCoreHelper ( ) : Mage_Core_Helper_Data
Résultat Mage_Core_Helper_Data

getOrAskForArgument() protected méthode

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
Résultat string

initMagento() protected méthode

Bootstrap magento shop
protected initMagento ( boolean $soft = false ) : boolean
$soft boolean
Résultat boolean

initialize() protected méthode

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 méthode

protected isSourceTypeRepository ( string $type ) : boolean
$type string
Résultat boolean

normalizePath() protected méthode

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
Résultat string

requireEnterprise() protected méthode

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

run() public méthode

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
Résultat integer

writeSection() protected méthode

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

Property Details

$_deprecatedAlias protected_oe property

protected array $_deprecatedAlias
Résultat array

$_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

$_websiteCodeMap protected_oe property

protected array $_websiteCodeMap
Résultat array