PearInstaller
extends Base
in package
Uses
EventEmitter
PearInstaller, installs PEAR packages into your project folder.
Tags
Table of Contents
- $events : array<string|int, mixed>
- $__kvo : array<string|int, mixed>
- Storage array for the properties with KVO (Key Value Observer) listeners.
- $channels : array<string|int, mixed>
- $packages : array<string|int, mixed>
- $targets : array<string|int, mixed>
- __call() : mixed
- Report that the $method doesn't exist.
- __callStatic() : mixed
- Report that the $method doesn't exist.
- __construct() : mixed
- __get() : mixed
- Report that $property doesn't exist.
- __set() : mixed
- Report that $property doesn't exist and set the property to the given $value.
- __toString() : string
- The object is used as an string.
- addChannel() : mixed
- Discovers all packages inside the given domain/channel.
- findRelease() : SimpleXMLElement
- Fetch the release info (download link) of a package If the version is "stable", "beta" or "latest" the $version will be set the versionnumber.
- getPackages() : array<string|int, mixed>
- Get a list of names for all detected packages.
- hasEvent() : bool
- Check id the $event is a registered event.
- install() : mixed
- Download and install a PEAR package.
- off() : mixed
- Remove a callback from an event.
- on() : string
- Add a callback for an event.
- registerCategory() : mixed
- Registers the packages from the associated channel & category.
- trigger() : mixed
- Trigger an event.
- extractFiles() : array<string|int, mixed>
- Extract files from the <dir> in the package(2).xml.
- makePath() : mixed
Properties
$events
protected
array<string|int, mixed>
$events
= array('installing' => [], 'installed' => [], 'channelAdded' => [])
The events/listeners
$__kvo
Storage array for the properties with KVO (Key Value Observer) listeners.
private
array<string|int, mixed>
$__kvo
= []
$channels
private
array<string|int, mixed>
$channels
= []
domain => restUrl;
$packages
private
array<string|int, mixed>
$packages
= []
package => url
$targets
private
array<string|int, mixed>
$targets
The target directories per role. array("php" => PATH.'pear/classes')
Methods
__call()
Report that the $method doesn't exist.
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Return values
mixed —__callStatic()
Report that the $method doesn't exist.
public
static __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Return values
mixed —__construct()
public
__construct(array<string|int, mixed> $targets) : mixed
Parameters
- $targets : array<string|int, mixed>
-
The target directories per role. array("php" => PATH.'pear/classes', 'doc' => ...)
Return values
mixed —__get()
Report that $property doesn't exist.
public
__get(string $property) : mixed
Parameters
- $property : string
Return values
mixed —__set()
Report that $property doesn't exist and set the property to the given $value.
public
__set(string $property, mixed $value) : mixed
Parameters
- $property : string
- $value : mixed
Return values
mixed —__toString()
The object is used as an string.
public
__toString() : string
Return values
string —addChannel()
Discovers all packages inside the given domain/channel.
public
addChannel(string $domain) : mixed
Parameters
- $domain : string
-
Channel/Domain. Example: 'pear.php.net', 'pear.phpunit.de', 'pear.doctrine-project.org'
Return values
mixed —findRelease()
Fetch the release info (download link) of a package If the version is "stable", "beta" or "latest" the $version will be set the versionnumber.
public
findRelease(array<string|int, mixed> $package, string &$version) : SimpleXMLElement
Parameters
- $package : array<string|int, mixed>
- $version : string
Tags
Return values
SimpleXMLElement —getPackages()
Get a list of names for all detected packages.
public
getPackages() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasEvent()
Check id the $event is a registered event.
public
hasEvent(string $event) : bool
Parameters
- $event : string
Return values
bool —install()
Download and install a PEAR package.
public
install(string $package[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $package : string
- $options : array<string|int, mixed> = []
-
array( 'version' = Install a specific version 'target' => alternative target directory 'channel' => specifiy the channel )
Tags
Return values
mixed —off()
Remove a callback from an event.
public
off(string $event, string $identifier) : mixed
Parameters
- $event : string
- $identifier : string
Return values
mixed —on()
Add a callback for an event.
public
on(string $event, Closure|string|array<string|int, mixed> $callback) : string
Parameters
- $event : string
- $callback : Closure|string|array<string|int, mixed>
Return values
string —identifier
registerCategory()
Registers the packages from the associated channel & category.
public
registerCategory(string $channel, string $category, SimpleXMLElement $packages) : mixed
Parameters
- $channel : string
- $category : string
- $packages : SimpleXMLElement
Return values
mixed —trigger()
Trigger an event.
public
trigger(string $event, stdClass $sender[, mixed $args = null ]) : mixed
Parameters
- $event : string
- $sender : stdClass
- $args : mixed = null
-
(optional)
Return values
mixed —extractFiles()
Extract files from the <dir> in the package(2).xml.
private
extractFiles(mixed $dir[, mixed $from = '' ][, mixed $to = '' ][, mixed $renames = [] ]) : array<string|int, mixed>
Parameters
- $dir : mixed
- $from : mixed = ''
- $to : mixed = ''
- $renames : mixed = []
Return values
array<string|int, mixed> —makePath()
private
makePath(mixed $folder, mixed $filename) : mixed
Parameters
- $folder : mixed
- $filename : mixed