PHP Класс Neos\Flow\Core\Migrations\Tools

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
getPackagesData ( string $packagesPath ) : array Will return an array with all available packages.
readComposerManifest ( string $pathAndFileName ) : array Read the package manifest from the composer.json file at $pathAndFileName
searchAndReplace ( string $search, string | Closure $replace, string $pathAndFilename, boolean $regularExpression = false ) : boolean | null Does a search and replace operation on the given file.
writeComposerManifest ( array $manifest, string $pathAndFilename ) : void Write the manifest to the given file.

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

Метод Описание
readPackageMetaData ( string $pathAndFileName ) : array | null Read the package metadata from the Package.xml file at $pathAndFileName

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

getPackagesData() публичный статический Метод

The data for each entry will be an array with the key, full path to the package (index 'path') and a category (the packages subfolder, index 'category'). The array is indexed by package key.
public static getPackagesData ( string $packagesPath ) : array
$packagesPath string
Результат array

readComposerManifest() публичный статический Метод

Read the package manifest from the composer.json file at $pathAndFileName
public static readComposerManifest ( string $pathAndFileName ) : array
$pathAndFileName string
Результат array

readPackageMetaData() защищенный статический Метод

Read the package metadata from the Package.xml file at $pathAndFileName
protected static readPackageMetaData ( string $pathAndFileName ) : array | null
$pathAndFileName string
Результат array | null

searchAndReplace() публичный статический Метод

A simple str_replace is used, unless $regularExpression is set to TRUE. In that case preg_replace is used. The given patterns are used as given, no quoting is applied! In case $regularExpression is TRUE, a closure can be given for the $replace variable. It should return a string and is given an array of matches as parameter.
public static searchAndReplace ( string $search, string | Closure $replace, string $pathAndFilename, boolean $regularExpression = false ) : boolean | null
$search string
$replace string | Closure
$pathAndFilename string
$regularExpression boolean
Результат boolean | null FALSE on errors, NULL on skip, TRUE on success

writeComposerManifest() публичный статический Метод

Write the manifest to the given file.
public static writeComposerManifest ( array $manifest, string $pathAndFilename ) : void
$manifest array
$pathAndFilename string
Результат void