PHP 클래스 Package2XmlToComposer, horde

Elements not typically found in package.xml files can be set (or overridden) using methods or a config JSON file. Yes, some of this capability is present in Composer itself, given Composer's ability to install PEAR packages. However, Composer relies on PEAR channels, meaning using Composer's classes for this capability would require developers supporting PEAR and Composer to first publish their packages to their channel and then generate composer.json files afterwards. Using this class, and in particular, the package2composer script that leverages this class, developers are able to use the package.xml file they're using with PEAR's package command to generate a composer.json, which allows a one-stage release workflow to be scripted.
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$output_file

보호된 프로퍼티들

프로퍼티 타입 설명
$autoload
$bin_files
$branch_alias
$config
$data
$dependency_map
$extra
$extra_suggestions
$homepage
$include_path
$keywords
$license
$name
$package2file_path
$repositories * Horde
$support
$type
$write_time_to_composer
$write_version_to_composer
$xml

공개 메소드들

메소드 설명
__construct ( $package2file, $config = null )
convert ( $output_file = null )
getParsedPackageData ( ) : array Allow retrieval of parsed data structure.
help ( ) Help output for CLI version
main ( ) Main method that starts conversion from the command-line
outputTo ( string $output_path ) Allow setting of the output path location
setAutoload ( array $config ) : self Set up any autoload configuration necessary
setBinFiles ( array $files ) : self Set bin-files list
setBranchAlias ( $aliases ) : self Set up any branch-alias that may be specified
setDependencyMap ( array $map ) : self Set a name mapping to dependencies. Naming conventions can vary between PEAR-style and composer/github style.
setExtra ( $extra ) : self Set the entire 'extra' array
setExtraSuggestions ( array $suggestions ) : self Set extra suggestions for features, beyond what is mentioned in package.xml
setHomepage ( string $homepage ) : self Set homepage to use in composer.json. Defaults to channel if not set.
setIncludePath ( array $list ) : self If you must, set up any include paths, relative to vendor dir
setKeywords ( array $keywords ) : self Set keywords which will be picked up by Packagist and/or other package search tools.
setLicense ( $license ) : self Set SPDX license string. If omitted, license value from package.xml will be used.
setName ( string $name ) : self Set the name of the package to put in composer.json
setRepositories ( $repos ) * Horde
setSupportInfo ( $support ) : self Set keywords which will be picked up by Packagist and/or other package search tools.
setType ( $type ) : self Set the type of composer package. Defaults to 'library'
writeTimeToComposer ( $bool ) : self Should release date/time information from package.xml be written to composer.json?
writeVersionToComposer ( $bool ) : self Should version information from package.xml be written to composer.json?

보호된 메소드들

메소드 설명
applyConfig ( ) Apply values provided in a config JSON file.
getChannelSuggestedAlias ( $channel )
getDepVersionString ( $req )

메소드 상세

__construct() 공개 메소드

public __construct ( $package2file, $config = null )

applyConfig() 보호된 메소드

Recognized values in JSON configuration: keywords license homepage dependency_map support autoload include_path bin Non-composer.json-standard values: dependency_map: dependency_map allows mapping of PEAR package dependencies to their composer equivalents. output_path: Allows setting where composer.json should be written. Default is to write it in the same directory as package.xml
protected applyConfig ( )

convert() 공개 메소드

public convert ( $output_file = null )

getChannelSuggestedAlias() 보호된 메소드

protected getChannelSuggestedAlias ( $channel )

getDepVersionString() 보호된 메소드

protected getDepVersionString ( $req )

getParsedPackageData() 공개 메소드

Allow retrieval of parsed data structure.
public getParsedPackageData ( ) : array
리턴 array

help() 공개 정적인 메소드

Help output for CLI version
public static help ( )

main() 공개 정적인 메소드

Main method that starts conversion from the command-line
public static main ( )

outputTo() 공개 메소드

Allow setting of the output path location
public outputTo ( string $output_path )
$output_path string The DIRECTORY to write composer.json into

setAutoload() 공개 메소드

Set up any autoload configuration necessary
public setAutoload ( array $config ) : self
$config array
리턴 self

setBinFiles() 공개 메소드

Set bin-files list
public setBinFiles ( array $files ) : self
$files array
리턴 self

setBranchAlias() 공개 메소드

Set up any branch-alias that may be specified
public setBranchAlias ( $aliases ) : self
리턴 self

setDependencyMap() 공개 메소드

Set a name mapping to dependencies. Naming conventions can vary between PEAR-style and composer/github style.
public setDependencyMap ( array $map ) : self
$map array
리턴 self

setExtra() 공개 메소드

Set the entire 'extra' array
또한 보기: http://getcomposer.org/doc/04-schema.md#extra
public setExtra ( $extra ) : self
리턴 self

setExtraSuggestions() 공개 메소드

Set extra suggestions for features, beyond what is mentioned in package.xml
public setExtraSuggestions ( array $suggestions ) : self
$suggestions array
리턴 self

setHomepage() 공개 메소드

package search tools.
public setHomepage ( string $homepage ) : self
$homepage string
리턴 self

setIncludePath() 공개 메소드

If you must, set up any include paths, relative to vendor dir
public setIncludePath ( array $list ) : self
$list array of paths
리턴 self

setKeywords() 공개 메소드

Set keywords which will be picked up by Packagist and/or other package search tools.
public setKeywords ( array $keywords ) : self
$keywords array
리턴 self

setLicense() 공개 메소드

Set SPDX license string. If omitted, license value from package.xml will be used.
또한 보기: http://www.spdx.org/licenses/
public setLicense ( $license ) : self
리턴 self

setName() 공개 메소드

If not set, the channel suggestedalias will be combined with lowercase package name.
public setName ( string $name ) : self
$name string
리턴 self

setRepositories() 공개 메소드

* Horde
public setRepositories ( $repos )

setSupportInfo() 공개 메소드

Set keywords which will be picked up by Packagist and/or other package search tools.
public setSupportInfo ( $support ) : self
리턴 self

setType() 공개 메소드

Set the type of composer package. Defaults to 'library'
public setType ( $type ) : self
리턴 self

writeTimeToComposer() 공개 메소드

Should release date/time information from package.xml be written to composer.json?
public writeTimeToComposer ( $bool ) : self
리턴 self

writeVersionToComposer() 공개 메소드

Should version information from package.xml be written to composer.json?
public writeVersionToComposer ( $bool ) : self
리턴 self

프로퍼티 상세

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

protected $autoload

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

protected $bin_files

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

protected $branch_alias

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

protected $config

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

protected $data

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

protected $dependency_map

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

protected $extra

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

protected $extra_suggestions

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

protected $homepage

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

protected $include_path

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

protected $keywords

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

protected $license

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

protected $name

$output_file 공개적으로 프로퍼티

public $output_file

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

protected $package2file_path

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

* Horde
protected $repositories

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

protected $support

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

protected $type

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

protected $write_time_to_composer

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

protected $write_version_to_composer

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

protected $xml