PHP Class Components_Component_Resolver, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Show file Open project: horde/horde

Public Methods

Method Description
__construct ( Components_Helper_Root $root, Components_Component_Factory $factory ) Constructor.
_identifyMatchingLocalPackage ( string $name, string $channel, array $options ) : string Identify a dependency that is available via a downloaded *.tgz archive.
resolveDependency ( Components_Component_Dependency $dependency, array $options ) : Components_Component | boolean Try to resolve a dependency into a component.
resolveName ( string $name, string $channel, array $options ) : Components_Component | boolean Try to resolve the given name and channel into a component.

Private Methods

Method Description
_getAttempts ( array $options ) : array Return the order of resolve attempts.
_getRemote ( string $channel ) : Horde_Pear_Remote Get a remote PEAR server handler for a specific channel.

Method Details

__construct() public method

Constructor.
public __construct ( Components_Helper_Root $root, Components_Component_Factory $factory )
$root Components_Helper_Root The repository root.
$factory Components_Component_Factory Helper factory.

_identifyMatchingLocalPackage() public method

Identify a dependency that is available via a downloaded *.tgz archive.
public _identifyMatchingLocalPackage ( string $name, string $channel, array $options ) : string
$name string The component name.
$channel string The component channel.
$options array Resolve options.
return string A path to the local archive if it was found.

resolveDependency() public method

Try to resolve a dependency into a component.
public resolveDependency ( Components_Component_Dependency $dependency, array $options ) : Components_Component | boolean
$dependency Components_Component_Dependency The dependency.
$options array Additional options.
 - allow_remote: May the resolver try to resolve to a remote channel?
 - order:        Order of stability preference.
return Components_Component | boolean The component if the name could be resolved.

resolveName() public method

Try to resolve the given name and channel into a component.
public resolveName ( string $name, string $channel, array $options ) : Components_Component | boolean
$name string The name of the component.
$channel string The channel origin of the component.
$options array Additional options.
return Components_Component | boolean The component if the name could be resolved.