PHP Class Components_Component_Source, horde

Inheritance: extends Components_Component_Base
Afficher le fichier Open project: horde/horde

Méthodes publiques

Méthode Description
__construct ( string $directory, Components_Config $config, Components_Component_Factory $factory ) Constructor.
changed ( string $log, Components_Helper_ChangeLog $helper, array $options ) : null Update the component changelog.
currentSentinel ( string $changes, string $app, array $options ) : string Replace the current sentinel.
getChangelog ( Components_Helper_ChangeLog $helper ) : string | null Returns the link to the change log.
getData ( ) : array Return a data array with the most relevant information about this component.
getDocumentOrigin ( ) : array | null Return the path to a DOCS_ORIGIN file within the component.
getPackageXmlPath ( ) : string Return the path to the package.xml file of the component.
getReleaseNotesPath ( ) : string | boolean Return the path to the release notes.
hasLocalPackageXml ( ) : boolean Indicate if the component has a local package.xml.
install ( Components_Pear_Environment $env, array $options = [], string $reason = '' ) : null Install a component.
nextSentinel ( string $changes, string $app, array $options ) : string Set the next sentinel.
nextVersion ( string $version, string $initial_note, string $stability_api = null, string $stability_release = null, array $options = [] ) : null Add the next version to the package.xml.
placeArchive ( string $destination, array $options = [] ) : array Place the component source archive at the specified location.
repositoryRoot ( Components_Helper_Root $helper ) : null Identify the repository root.
setState ( string $rel_state = null, string $api_state = null, $options = [] ) Sets the state in the package.xml
setVersion ( string $rel_version = null, string $api_version = null, array $options = [] ) : null Set the version in the package.xml
tag ( string $tag, string $message, Components_Helper_Commit $commit ) : null Tag the component.
timestampAndSync ( array $options ) : string Timestamp the package.xml file with the current time.
updateComposer ( array $options ) : string Updates the composer.json file.
updatePackageXml ( string $action, array $options ) : null Update the package.xml file for this component.

Méthodes protégées

Méthode Description
getPackageXml ( ) : Horde_Pear_Package_Xml Return a PEAR package representation for the component.

Private Methods

Méthode Description
_getPackageFile ( ) : PEAR_PackageFile Return a PEAR PackageFile representation for the component.

Method Details

__construct() public méthode

Constructor.
public __construct ( string $directory, Components_Config $config, Components_Component_Factory $factory )
$directory string Path to the source directory.
$config Components_Config The configuration for the current job.
$factory Components_Component_Factory Generator for additional helpers.

changed() public méthode

Update the component changelog.
public changed ( string $log, Components_Helper_ChangeLog $helper, array $options ) : null
$log string The log entry.
$helper Components_Helper_ChangeLog The change log helper.
$options array Options for the operation.
Résultat null

currentSentinel() public méthode

Replace the current sentinel.
public currentSentinel ( string $changes, string $app, array $options ) : string
$changes string New version for the CHANGES file.
$app string New version for the Application.php file.
$options array Options for the operation.
Résultat string The success message.

getChangelog() public méthode

Returns the link to the change log.
public getChangelog ( Components_Helper_ChangeLog $helper ) : string | null
$helper Components_Helper_ChangeLog The change log helper.
Résultat string | null The link to the change log.

getData() public méthode

Return a data array with the most relevant information about this component.
public getData ( ) : array
Résultat array Information about this component.

getDocumentOrigin() public méthode

Return the path to a DOCS_ORIGIN file within the component.
public getDocumentOrigin ( ) : array | null
Résultat array | null An array containing the path name and the component base directory or NULL if there is no DOCS_ORIGIN file.

getPackageXml() protected méthode

Return a PEAR package representation for the component.
protected getPackageXml ( ) : Horde_Pear_Package_Xml
Résultat Horde_Pear_Package_Xml The package representation.

getPackageXmlPath() public méthode

Return the path to the package.xml file of the component.
public getPackageXmlPath ( ) : string
Résultat string The path to the package.xml file.

getReleaseNotesPath() public méthode

Return the path to the release notes.
public getReleaseNotesPath ( ) : string | boolean
Résultat string | boolean The path to the release notes or false.

hasLocalPackageXml() public méthode

Indicate if the component has a local package.xml.
public hasLocalPackageXml ( ) : boolean
Résultat boolean True if a package.xml exists.

install() public méthode

Install a component.
public install ( Components_Pear_Environment $env, array $options = [], string $reason = '' ) : null
$env Components_Pear_Environment The environment to install into.
$options array Install options.
$reason string Optional reason for adding the package.
Résultat null

nextSentinel() public méthode

Set the next sentinel.
public nextSentinel ( string $changes, string $app, array $options ) : string
$changes string New version for the CHANGES file.
$app string New version for the Application.php file.
$options array Options for the operation.
Résultat string The success message.

nextVersion() public méthode

Add the next version to the package.xml.
public nextVersion ( string $version, string $initial_note, string $stability_api = null, string $stability_release = null, array $options = [] ) : null
$version string The new version number.
$initial_note string The text for the initial note.
$stability_api string The API stability for the next release.
$stability_release string The stability for the next release.
$options array Options for the operation.
Résultat null

placeArchive() public méthode

Place the component source archive at the specified location.
public placeArchive ( string $destination, array $options = [] ) : array
$destination string The path to write the archive to.
$options array Options for the operation.
Résultat array An array with at least [0] the path to the resulting archive, optionally [1] an array of error strings, and [2] PEAR output.

repositoryRoot() public méthode

Identify the repository root.
public repositoryRoot ( Components_Helper_Root $helper ) : null
$helper Components_Helper_Root The root helper.
Résultat null

setState() public méthode

Sets the state in the package.xml
public setState ( string $rel_state = null, string $api_state = null, $options = [] )
$rel_state string The new release state.
$api_state string The new api state.

setVersion() public méthode

Set the version in the package.xml
public setVersion ( string $rel_version = null, string $api_version = null, array $options = [] ) : null
$rel_version string The new release version number.
$api_version string The new api version number.
$options array Options for the operation.
Résultat null

tag() public méthode

Tag the component.
public tag ( string $tag, string $message, Components_Helper_Commit $commit ) : null
$tag string Tag name.
$message string Tag message.
$commit Components_Helper_Commit The commit helper.
Résultat null

timestampAndSync() public méthode

Timestamp the package.xml file with the current time.
public timestampAndSync ( array $options ) : string
$options array Options for the operation.
Résultat string The success message.

updateComposer() public méthode

Updates the composer.json file.
public updateComposer ( array $options ) : string
$options array Options for the operation.
Résultat string The success message.

updatePackageXml() public méthode

Update the package.xml file for this component.
public updatePackageXml ( string $action, array $options ) : null
$action string The action to perform. Either "update", "diff", or "print".
$options array Options for this operation.
Résultat null