Base
in package
implements
Component
Represents base functionality for a component.
Copyright 2011-2020 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Tags
Interfaces, Classes, Traits and Enums
- Component
- Represents a component.
Table of Contents
- $_config : Config
- $_factory : Factory
- __construct() : mixed
- Constructor.
- changed() : array<string|int, string>
- Update the component changelog.
- currentSentinel() : array<string|int, string>
- Replace the current sentinel.
- getChangelogLink() : string
- Returns the link to the change log.
- getChannel() : string
- Return the channel of the component.
- getData() : stdClass
- Return a data array with the most relevant information about this component.
- getDate() : string
- Return the last release date of the component.
- getDependencies() : array<string|int, mixed>
- Return the dependencies for the component.
- getDependencyList() : DependencyList
- Return the dependency list for the component.
- getDescription() : string
- Return the component description.
- getDocumentOrigin() : string|null
- Return the path to a DOCS_ORIGIN file within the component.
- getLeads() : string
- Return the package lead developers.
- getLicense() : string
- Return the component license.
- getLicenseLocation() : string
- Return the component license URI.
- getName() : string
- Return the name of the component.
- getNotes() : string
- Return the package notes.
- getPreviousVersion() : string
- Returns the previous version of the component.
- getReleaseNotesPath() : string|bool
- Return the path to the release notes.
- getState() : string
- Return the stability of the release or api.
- getSummary() : string
- Return the component summary.
- getVersion() : string
- Return the version of the component.
- hasLocalPackageXml() : bool
- Indicate if the component has a local package.xml.
- installChannel() : void
- Install the channel of this component in the environment.
- nextVersion() : void
- Add the next version to the package.xml.
- repositoryRoot() : string
- Identify the repository root.
- tag() : string
- Tag the component.
- timestamp() : string
- Timestamp the package.xml file with the current time.
- updatePackage() : string
- Update the package.xml file for this component.
- _hasCi() : bool
- Check if the library has a CI job.
- createDestination() : mixed
- Create the specified directory.
- getBaseInstallationOptions() : array<string|int, mixed>
- Derive the basic PEAR install options from the current option set.
- getFactory() : Factory
- Return the factory.
- getOptions() : array<string|int, mixed>
- Return the application options.
- getPackageXml() : Horde_Pear_Package_Xml
- Return a PEAR package representation for the component.
Properties
$_config
protected
Config
$_config
$_factory read-only
private
Factory
$_factory
Methods
__construct()
Constructor.
public
__construct(Config $_config, Factory $_factory) : mixed
Parameters
- $_config : Config
-
The configuration for the current job.
- $_factory : Factory
-
Generator for additional helpers.
Return values
mixed —changed()
Update the component changelog.
public
changed(string $log, array<string|int, mixed> $options) : array<string|int, string>
Parameters
- $log : string
-
The log entry.
- $options : array<string|int, mixed>
-
Options for the operation.
Tags
Return values
array<string|int, string> —Output messages.
currentSentinel()
Replace the current sentinel.
public
currentSentinel(string $changes, string $app, array<string|int, mixed> $options) : array<string|int, string>
Parameters
- $changes : string
-
New version for the CHANGES file.
- $app : string
-
New version for the Application.php file.
- $options : array<string|int, mixed>
-
Options for the operation.
Tags
Return values
array<string|int, string> —The list of processed files.
getChangelogLink()
Returns the link to the change log.
public
getChangelogLink() : string
Tags
Return values
string —The link to the change log.
getChannel()
Return the channel of the component.
public
getChannel() : string
Tags
Return values
string —The component channel.
getData()
Return a data array with the most relevant information about this component.
public
getData() : stdClass
Tags
Return values
stdClass —Information about this component.
getDate()
Return the last release date of the component.
public
getDate() : string
Tags
Return values
string —The date.
getDependencies()
Return the dependencies for the component.
public
getDependencies() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —The component dependencies.
getDependencyList()
Return the dependency list for the component.
public
getDependencyList() : DependencyList
Return values
DependencyList —The dependency list.
getDescription()
Return the component description.
public
getDescription() : string
Tags
Return values
string —The description of the component.
getDocumentOrigin()
Return the path to a DOCS_ORIGIN file within the component.
public
getDocumentOrigin() : string|null
Return values
string|null —The path name or NULL if there is no DOCS_ORIGIN file.
getLeads()
Return the package lead developers.
public
getLeads() : string
Tags
Return values
string —The package lead developers.
getLicense()
Return the component license.
public
getLicense() : string
Tags
Return values
string —The component license.
getLicenseLocation()
Return the component license URI.
public
getLicenseLocation() : string
Tags
Return values
string —The component license URI.
getName()
Return the name of the component.
public
getName() : string
Tags
Return values
string —The component name.
getNotes()
Return the package notes.
public
getNotes() : string
Tags
Return values
string —The notes for the current release.
getPreviousVersion()
Returns the previous version of the component.
public
getPreviousVersion() : string
Tags
Return values
string —The previous component version.
getReleaseNotesPath()
Return the path to the release notes.
public
getReleaseNotesPath() : string|bool
Return values
string|bool —The path to the release notes or false.
getState()
Return the stability of the release or api.
public
getState([string $key = 'release' ]) : string
Parameters
- $key : string = 'release'
-
"release" or "api"
Tags
Return values
string —The stability.
getSummary()
Return the component summary.
public
getSummary() : string
Tags
Return values
string —The summary of the component.
getVersion()
Return the version of the component.
public
getVersion() : string
Tags
Return values
string —The component version.
hasLocalPackageXml()
Indicate if the component has a local package.xml.
public
hasLocalPackageXml() : bool
Return values
bool —True if a package.xml exists.
installChannel()
Install the channel of this component in the environment.
public
installChannel(Environment $env[, array<string|int, mixed> $options = [] ]) : void
Parameters
- $env : Environment
-
The environment to install into.
- $options : array<string|int, mixed> = []
-
Install options.
Tags
Return values
void —nextVersion()
Add the next version to the package.xml.
public
nextVersion(string $version, string $initial_note[, string $stability_api = null ][, string $stability_release = null ][, array<string|int, mixed> $options = [] ]) : void
Parameters
- $version : string
-
The new version number.
- $initial_note : string
-
The text for the initial note.
- $stability_api : string = null
-
The API stability for the next release.
- $stability_release : string = null
-
The stability for the next release.
- $options : array<string|int, mixed> = []
-
Options for the operation.
Tags
Return values
void —repositoryRoot()
Identify the repository root.
public
repositoryRoot(Root $helper) : string
Parameters
- $helper : Root
-
The root helper.
Tags
Return values
string —tag()
Tag the component.
public
tag(string $tag, string $message, Commit $commit) : string
Parameters
- $tag : string
-
Tag name.
- $message : string
-
Tag message.
- $commit : Commit
-
The commit helper.
Tags
Return values
string —timestamp()
Timestamp the package.xml file with the current time.
public
timestamp(array<string|int, mixed> $options) : string
Parameters
- $options : array<string|int, mixed>
-
Options for the operation.
Tags
Return values
string —The success message.
updatePackage()
Update the package.xml file for this component.
public
updatePackage(string $action, array<string|int, mixed> $options) : string
Parameters
- $action : string
-
The action to perform. Either "update", "diff", or "print".
- $options : array<string|int, mixed>
-
Options for this operation.
Tags
Return values
string —_hasCi()
Check if the library has a CI job.
protected
_hasCi() : bool
Tags
Return values
bool —True if a CI job is defined.
createDestination()
Create the specified directory.
protected
createDestination(string $destination) : mixed
Parameters
- $destination : string
-
The destination path.
Return values
mixed —getBaseInstallationOptions()
Derive the basic PEAR install options from the current option set.
protected
getBaseInstallationOptions(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
-
The current options.
Return values
array<string|int, mixed> —The installation options.
getFactory()
Return the factory.
protected
getFactory() : Factory
Return values
Factory —The factory.
getOptions()
Return the application options.
protected
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —The options.
getPackageXml()
Return a PEAR package representation for the component.
protected
getPackageXml() : Horde_Pear_Package_Xml
Tags
Return values
Horde_Pear_Package_Xml —The package representation.