PHP 클래스 Neos\Flow\Core\Migrations\Tools

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

공개 메소드들

메소드 설명
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