PHP Class Components_Component_Source, horde

Inheritance: extends Components_Component_Base
Show file Open project: horde/horde

Public Methods

Method 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.

Protected Methods

Method Description
getPackageXml ( ) : Horde_Pear_Package_Xml Return a PEAR package representation for the component.

Private Methods

Method Description
_getPackageFile ( ) : PEAR_PackageFile Return a PEAR PackageFile representation for the component.

Method Details

__construct() public method

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 method

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.
return null

currentSentinel() public method

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.
return string The success message.

getChangelog() public method

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

getData() public method

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

getDocumentOrigin() public method

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

getPackageXml() protected method

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

getPackageXmlPath() public method

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

getReleaseNotesPath() public method

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

hasLocalPackageXml() public method

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

install() public method

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.
return null

nextSentinel() public method

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.
return string The success message.

nextVersion() public method

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.
return null

placeArchive() public method

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.
return 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 method

Identify the repository root.
public repositoryRoot ( Components_Helper_Root $helper ) : null
$helper Components_Helper_Root The root helper.
return null

setState() public method

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 method

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.
return null

tag() public method

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.
return null

timestampAndSync() public method

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

updateComposer() public method

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

updatePackageXml() public method

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.
return null