PHP Class ConvertM1M2, convertm1m2

Copyright (c) 2015 Boris Gurvich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Afficher le fichier Open project: unirgy/convertm1m2 Class Usage Examples

Protected Properties

Свойство Type Description
$_aliases
$_autoloadMode
$_classFileCache
$_currentFile
$_env
$_fileCache
$_layouts
$_replace Sources: http://mage2.ru, https://wiki.magento.com/display/MAGE2DOC/Class+Mage
$_reservedWordsRe
$_skipConvertToDiRegex .. )$#ix
$_testInputFiles
$_testMode
$_testOutputFiles

Méthodes publiques

Méthode Description
__construct ( $sourceDir, $mage1Dir, $mage2Dir )
addTestInputFile ( $contents, $filename = null )
autoloadCallback ( $class )
collectCoreModulesConfigs ( )
collectCoreModulesLayouts ( )
convertAllConfigs ( )
convertAllControllers ( )
convertAllExtensions ( $stage )
convertAllI18n ( )
convertAllLayouts ( )
convertAllObservers ( )
convertAllOtherFiles ( )
convertAllPhpFilesDI ( )
convertAllTemplates ( )
convertAllWebAssets ( )
convertCodeContents ( $contents, $mode = 'php' )
convertCodeContentsPhpMode ( $contents )
convertCodeObjectManagerToDI ( $contents )
convertCodeParseMethods ( $contents, $fileType = false, $returnResult = false )
convertConfigAcl ( )
convertConfigAclRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml, $path = '' )
convertConfigAdminhtmlDI ( )
convertConfigCatalogAttributes ( )
convertConfigCrontab ( )
convertConfigDI ( )
convertConfigDefaults ( )
convertConfigEmailTemplates ( )
convertConfigEvents ( )
convertConfigFieldset ( )
convertConfigFrontendDI ( )
convertConfigMenu ( )
convertConfigMenuRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml, $parent = null )
convertConfigModule ( )
convertConfigPdf ( )
convertConfigResources ( )
convertConfigRoutesAdmin ( )
convertConfigRoutesFrontend ( )
convertConfigSales ( )
convertConfigSystem ( )
convertConfigSystemNode ( $type, SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
convertConfigWidget ( )
convertConfigWidgetDataRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
convertController ( $file, $sourceDir, $targetDir )
convertControllerContext ( $contents )
convertDIGetParentConstructArgs ( $contents )
convertExtensionStage1 ( $extName, $rootDir )
convertExtensionStage2 ( $extName )
convertFindParentConstruct ( $contents, $first = true )
convertGenerateComposerFile ( )
convertGenerateMetaFiles ( )
convertGenerateRegistrationFile ( )
convertGetFullClassName ( $contents, $contentsClass, $shortClass ) : string
convertLayoutAreaTheme ( $area, $theme )
convertLayoutArgumentRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
convertLayoutFile ( $area, $file, $outputDir )
convertLayoutHeadNode ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
convertLayoutRecursive ( $area, SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
convertNamespaceUse ( $contents )
convertObserver ( $sourceFile, $targetDir )
convertPhpClasses ( $folder, $callback = null )
convertShortArraySyntax ( $contents )
convertTemplatesAreaTheme ( $area, $theme )
convertTemplatesEmails ( )
copyFile ( $src, $dst, $expand = false )
copyRecursive ( $src, $dst, $expand = false )
createConfigXml ( string $schemaPath, string $rootTagName = 'config' ) : SimpleDOM
deleteFile ( $filename, $expand = false )
expandOutputPath ( $path )
expandSourcePath ( $path )
findFilesRecursive ( $dir, $expand = false )
getClassName ( $type, $moduleClassKey, $m2 = true )
getOpportunisticArgValue ( $value )
getReplaceMaps ( )
getTestOutputFile ( $filename = null )
log ( $msg, $continue = false )
readFile ( $filename, $expand = false )
setTestMode ( $testMode = true )
writeFile ( $filename, $contents, $expand = false )

Method Details

__construct() public méthode

public __construct ( $sourceDir, $mage1Dir, $mage2Dir )

addTestInputFile() public méthode

public addTestInputFile ( $contents, $filename = null )

autoloadCallback() public méthode

public autoloadCallback ( $class )

collectCoreModulesConfigs() public méthode

collectCoreModulesLayouts() public méthode

convertAllConfigs() public méthode

public convertAllConfigs ( )

convertAllControllers() public méthode

convertAllExtensions() public méthode

public convertAllExtensions ( $stage )

convertAllI18n() public méthode

public convertAllI18n ( )

convertAllLayouts() public méthode

public convertAllLayouts ( )

convertAllObservers() public méthode

public convertAllObservers ( )

convertAllOtherFiles() public méthode

convertAllPhpFilesDI() public méthode

convertAllTemplates() public méthode

public convertAllTemplates ( )

convertAllWebAssets() public méthode

public convertAllWebAssets ( )

convertCodeContents() public méthode

public convertCodeContents ( $contents, $mode = 'php' )

convertCodeContentsPhpMode() public méthode

public convertCodeContentsPhpMode ( $contents )

convertCodeObjectManagerToDI() public méthode

public convertCodeObjectManagerToDI ( $contents )

convertCodeParseMethods() public méthode

public convertCodeParseMethods ( $contents, $fileType = false, $returnResult = false )

convertConfigAcl() public méthode

public convertConfigAcl ( )

convertConfigAclRecursive() public méthode

public convertConfigAclRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml, $path = '' )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertConfigAdminhtmlDI() public méthode

convertConfigCatalogAttributes() public méthode

convertConfigCrontab() public méthode

convertConfigDI() public méthode

public convertConfigDI ( )

convertConfigDefaults() public méthode

convertConfigEmailTemplates() public méthode

convertConfigEvents() public méthode

public convertConfigEvents ( )

convertConfigFieldset() public méthode

convertConfigFrontendDI() public méthode

convertConfigMenu() public méthode

public convertConfigMenu ( )

convertConfigMenuRecursive() public méthode

public convertConfigMenuRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml, $parent = null )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertConfigModule() public méthode

public convertConfigModule ( )

convertConfigPdf() public méthode

public convertConfigPdf ( )

convertConfigResources() public méthode

convertConfigRoutesAdmin() public méthode

convertConfigRoutesFrontend() public méthode

convertConfigSales() public méthode

public convertConfigSales ( )

convertConfigSystem() public méthode

public convertConfigSystem ( )

convertConfigSystemNode() public méthode

public convertConfigSystemNode ( $type, SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertConfigWidget() public méthode

public convertConfigWidget ( )

convertConfigWidgetDataRecursive() public méthode

public convertConfigWidgetDataRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertController() public méthode

public convertController ( $file, $sourceDir, $targetDir )

convertControllerContext() public méthode

public convertControllerContext ( $contents )

convertDIGetParentConstructArgs() public méthode

public convertDIGetParentConstructArgs ( $contents )

convertExtensionStage1() public méthode

public convertExtensionStage1 ( $extName, $rootDir )

convertExtensionStage2() public méthode

public convertExtensionStage2 ( $extName )

convertFindParentConstruct() public méthode

public convertFindParentConstruct ( $contents, $first = true )

convertGenerateComposerFile() public méthode

convertGenerateMetaFiles() public méthode

convertGenerateRegistrationFile() public méthode

convertGetFullClassName() public méthode

public convertGetFullClassName ( $contents, $contentsClass, $shortClass ) : string
$contents
$contentsClass
$shortClass
Résultat string full class with first backslash for consistency

convertLayoutAreaTheme() public méthode

public convertLayoutAreaTheme ( $area, $theme )

convertLayoutArgumentRecursive() public méthode

public convertLayoutArgumentRecursive ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertLayoutFile() public méthode

public convertLayoutFile ( $area, $file, $outputDir )

convertLayoutHeadNode() public méthode

public convertLayoutHeadNode ( SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertLayoutRecursive() public méthode

public convertLayoutRecursive ( $area, SimpleXMLElement $sourceXml, SimpleXMLElement $targetXml )
$sourceXml SimpleXMLElement
$targetXml SimpleXMLElement

convertNamespaceUse() public méthode

public convertNamespaceUse ( $contents )

convertObserver() public méthode

public convertObserver ( $sourceFile, $targetDir )

convertPhpClasses() public méthode

public convertPhpClasses ( $folder, $callback = null )

convertShortArraySyntax() public méthode

public convertShortArraySyntax ( $contents )

convertTemplatesAreaTheme() public méthode

public convertTemplatesAreaTheme ( $area, $theme )

convertTemplatesEmails() public méthode

copyFile() public méthode

public copyFile ( $src, $dst, $expand = false )

copyRecursive() public méthode

public copyRecursive ( $src, $dst, $expand = false )

createConfigXml() public méthode

public createConfigXml ( string $schemaPath, string $rootTagName = 'config' ) : SimpleDOM
$schemaPath string
$rootTagName string
Résultat SimpleDOM

deleteFile() public méthode

public deleteFile ( $filename, $expand = false )

expandOutputPath() public méthode

public expandOutputPath ( $path )

expandSourcePath() public méthode

public expandSourcePath ( $path )

findFilesRecursive() public méthode

public findFilesRecursive ( $dir, $expand = false )

getClassName() public méthode

public getClassName ( $type, $moduleClassKey, $m2 = true )

getOpportunisticArgValue() public méthode

public getOpportunisticArgValue ( $value )

getReplaceMaps() public méthode

public getReplaceMaps ( )

getTestOutputFile() public méthode

public getTestOutputFile ( $filename = null )

log() public méthode

public log ( $msg, $continue = false )

readFile() public méthode

public readFile ( $filename, $expand = false )

setTestMode() public méthode

public setTestMode ( $testMode = true )

writeFile() public méthode

public writeFile ( $filename, $contents, $expand = false )

Property Details

$_aliases protected_oe property

protected $_aliases

$_autoloadMode protected_oe property

protected $_autoloadMode

$_classFileCache protected_oe property

protected $_classFileCache

$_currentFile protected_oe property

protected $_currentFile

$_env protected_oe property

protected $_env

$_fileCache protected_oe property

protected $_fileCache

$_layouts protected_oe property

protected $_layouts

$_replace protected_oe property

Sources: http://mage2.ru, https://wiki.magento.com/display/MAGE2DOC/Class+Mage
protected $_replace

$_reservedWordsRe protected_oe property

protected $_reservedWordsRe

$_skipConvertToDiRegex protected_oe property

.. )$#ix
protected $_skipConvertToDiRegex

$_testInputFiles protected_oe property

protected $_testInputFiles

$_testMode protected_oe property

protected $_testMode

$_testOutputFiles protected_oe property

protected $_testOutputFiles