PHP 클래스 Wikimedia\Composer\Merge\ExtraPackage

저자: Bryan Davis ([email protected])
파일 보기 프로젝트 열기: wikimedia/composer-merge-plugin 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$composer Composer\Composer
$json array
$logger Wikimedia\Composer\Logger
$package Composer\Package\CompletePackage
$path string
$versionParser Composer\Package\Version\VersionParser

공개 메소드들

메소드 설명
__construct ( string $path, Composer\Composer $composer, Wikimedia\Composer\Logger $logger )
getIncludes ( ) : array Get list of additional packages to include if precessing recursively.
getRequires ( ) : array Get list of additional packages to require if precessing recursively.
mergeDevInto ( Composer\Package\RootPackageInterface $root, PluginState $state ) Merge just the dev portion into a RootPackageInterface
mergeExtra ( Composer\Package\RootPackageInterface $root, PluginState $state ) Merge extra config into a RootPackageInterface
mergeExtraArray ( boolean $mergeDeep, array $array1, array $array2 ) : array Merges two arrays either via arrayMergeDeep or via array_merge.
mergeInto ( Composer\Package\RootPackageInterface $root, PluginState $state ) Merge this package into a RootPackageInterface
unwrapIfNeeded ( Composer\Package\RootPackageInterface $root, string $method = 'setExtra' ) : Composer\Package\RootPackageInterface | Composer\Package\RootPackage Get a full featured Package from a RootPackageInterface.

보호된 메소드들

메소드 설명
extractReferences ( array $requires, array $references ) : array Extract vcs revision from version constraint (dev-master#abc123.
fixRelativePaths ( array $paths ) : array Fix a collection of paths that are relative to this package to be relative to the base package.
loadPackage ( array $json ) : Composer\Package\CompletePackage
mergeAutoload ( string $type, Composer\Package\RootPackageInterface $root ) Merge autoload or autoload-dev into a RootPackageInterface
mergeOrDefer ( string $type, array $origin, array $merge, PluginState $state ) : array Merge two collections of package links and collect duplicates for subsequent processing.
mergePackageLinks ( string $type, Composer\Package\RootPackageInterface $root ) Merge package links of the given type into a RootPackageInterface
mergeReferences ( Composer\Package\RootPackageInterface $root ) Update the root packages reference information.
mergeRequires ( string $type, Composer\Package\RootPackageInterface $root, PluginState $state ) Merge require or require-dev into a RootPackageInterface
mergeStabilityFlags ( Composer\Package\RootPackageInterface $root, array $requires ) Extract and merge stability flags from the given collection of requires and merge them into a RootPackageInterface
mergeSuggests ( Composer\Package\RootPackageInterface $root ) Merge suggested packages into a RootPackageInterface
prependRepositories ( Composer\Package\RootPackageInterface $root ) Add a collection of repositories described by the given configuration to the given package and the global repository manager.
readPackageJson ( string $path ) : array Read the contents of a composer.json style file into an array.
replaceSelfVersionDependencies ( string $type, array $links, Composer\Package\RootPackageInterface $root ) : array Update Links with a 'self.version' constraint with the root package's version.

메소드 상세

__construct() 공개 메소드

public __construct ( string $path, Composer\Composer $composer, Wikimedia\Composer\Logger $logger )
$path string Path to composer.json file
$composer Composer\Composer
$logger Wikimedia\Composer\Logger

extractReferences() 보호된 메소드

Extract vcs revision from version constraint (dev-master#abc123.
또한 보기: RootPackageLoader::extractReferences()
protected extractReferences ( array $requires, array $references ) : array
$requires array
$references array
리턴 array

fixRelativePaths() 보호된 메소드

Fix a collection of paths that are relative to this package to be relative to the base package.
protected fixRelativePaths ( array $paths ) : array
$paths array
리턴 array

getIncludes() 공개 메소드

Get list of additional packages to include if precessing recursively.
public getIncludes ( ) : array
리턴 array

getRequires() 공개 메소드

Get list of additional packages to require if precessing recursively.
public getRequires ( ) : array
리턴 array

loadPackage() 보호된 메소드

protected loadPackage ( array $json ) : Composer\Package\CompletePackage
$json array
리턴 Composer\Package\CompletePackage

mergeAutoload() 보호된 메소드

Merge autoload or autoload-dev into a RootPackageInterface
protected mergeAutoload ( string $type, Composer\Package\RootPackageInterface $root )
$type string 'autoload' or 'devAutoload'
$root Composer\Package\RootPackageInterface

mergeDevInto() 공개 메소드

Merge just the dev portion into a RootPackageInterface
public mergeDevInto ( Composer\Package\RootPackageInterface $root, PluginState $state )
$root Composer\Package\RootPackageInterface
$state PluginState

mergeExtra() 공개 메소드

Merge extra config into a RootPackageInterface
public mergeExtra ( Composer\Package\RootPackageInterface $root, PluginState $state )
$root Composer\Package\RootPackageInterface
$state PluginState

mergeExtraArray() 공개 정적인 메소드

Merges two arrays either via arrayMergeDeep or via array_merge.
public static mergeExtraArray ( boolean $mergeDeep, array $array1, array $array2 ) : array
$mergeDeep boolean
$array1 array
$array2 array
리턴 array

mergeInto() 공개 메소드

Merge this package into a RootPackageInterface
public mergeInto ( Composer\Package\RootPackageInterface $root, PluginState $state )
$root Composer\Package\RootPackageInterface
$state PluginState

mergeOrDefer() 보호된 메소드

Merge two collections of package links and collect duplicates for subsequent processing.
protected mergeOrDefer ( string $type, array $origin, array $merge, PluginState $state ) : array
$type string 'require' or 'require-dev'
$origin array Primary collection
$merge array Additional collection
$state PluginState
리턴 array Merged collection

mergeReferences() 보호된 메소드

Update the root packages reference information.
protected mergeReferences ( Composer\Package\RootPackageInterface $root )
$root Composer\Package\RootPackageInterface

mergeRequires() 보호된 메소드

Merge require or require-dev into a RootPackageInterface
protected mergeRequires ( string $type, Composer\Package\RootPackageInterface $root, PluginState $state )
$type string 'require' or 'require-dev'
$root Composer\Package\RootPackageInterface
$state PluginState

mergeStabilityFlags() 보호된 메소드

Extract and merge stability flags from the given collection of requires and merge them into a RootPackageInterface
protected mergeStabilityFlags ( Composer\Package\RootPackageInterface $root, array $requires )
$root Composer\Package\RootPackageInterface
$requires array

mergeSuggests() 보호된 메소드

Merge suggested packages into a RootPackageInterface
protected mergeSuggests ( Composer\Package\RootPackageInterface $root )
$root Composer\Package\RootPackageInterface

prependRepositories() 보호된 메소드

Add a collection of repositories described by the given configuration to the given package and the global repository manager.
protected prependRepositories ( Composer\Package\RootPackageInterface $root )
$root Composer\Package\RootPackageInterface

readPackageJson() 보호된 메소드

The package contents are fixed up to be usable to create a Package object by providing dummy "name" and "version" values if they have not been provided in the file. This is consistent with the default root package loading behavior of Composer.
protected readPackageJson ( string $path ) : array
$path string
리턴 array

replaceSelfVersionDependencies() 보호된 메소드

Update Links with a 'self.version' constraint with the root package's version.
protected replaceSelfVersionDependencies ( string $type, array $links, Composer\Package\RootPackageInterface $root ) : array
$type string Link type
$links array
$root Composer\Package\RootPackageInterface
리턴 array

unwrapIfNeeded() 공개 정적인 메소드

In Composer versions before 599ad77 the RootPackageInterface only defines a sub-set of operations needed by composer-merge-plugin and RootAliasPackage only implemented those methods defined by the interface. Most of the unimplemented methods in RootAliasPackage can be worked around because the getter methods that are implemented proxy to the aliased package which we can modify by unwrapping. The exception being modifying the 'conflicts', 'provides' and 'replaces' collections. We have no way to actually modify those collections unfortunately in older versions of Composer.
public static unwrapIfNeeded ( Composer\Package\RootPackageInterface $root, string $method = 'setExtra' ) : Composer\Package\RootPackageInterface | Composer\Package\RootPackage
$root Composer\Package\RootPackageInterface
$method string Method needed
리턴 Composer\Package\RootPackageInterface | Composer\Package\RootPackage

프로퍼티 상세

$composer 보호되어 있는 프로퍼티

protected Composer,Composer $composer
리턴 Composer\Composer

$json 보호되어 있는 프로퍼티

protected array $json
리턴 array

$logger 보호되어 있는 프로퍼티

protected Logger,Wikimedia\Composer $logger
리턴 Wikimedia\Composer\Logger

$package 보호되어 있는 프로퍼티

protected CompletePackage,Composer\Package $package
리턴 Composer\Package\CompletePackage

$path 보호되어 있는 프로퍼티

protected string $path
리턴 string

$versionParser 보호되어 있는 프로퍼티

protected VersionParser,Composer\Package\Version $versionParser
리턴 Composer\Package\Version\VersionParser