Identify
in package
Identifies the requested component based on an argument and delivers a corresponding component instance.
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
Table of Contents
- $_actions : mixed
- $_config : Config
- $_dependencies : Dependencies
- __construct() : mixed
- Constructor.
- setComponentInConfiguration() : null
- Inject the component selected based on the command arguments into the configuration.
- _containsHordeYml() : bool
- Checks if the directory contains a .horde.yml file.
- _containsPackageXml() : bool
- Checks if the directory contains a package.xml file.
- _determineComponent() : array<string|int, mixed>
- Determine the requested component.
- _isDirectory() : bool
- Checks if the provided directory is a directory.
- _isHordeYml() : bool
- Checks if the file name is a .horde.yml file.
- _isPackageXml() : bool
- Checks if the file name is a package.xml file.
Properties
$_actions
private
mixed
$_actions
$_config read-only
private
Config
$_config
$_dependencies read-only
private
Dependencies
$_dependencies
Methods
__construct()
Constructor.
public
__construct(Config $_config, array<string|int, mixed> $_actions, Dependencies $_dependencies) : mixed
Parameters
- $_config : Config
-
The active configuration.
- $_actions : array<string|int, mixed>
-
The list of available actions.
- $_dependencies : Dependencies
-
The dependency handler.
Return values
mixed —setComponentInConfiguration()
Inject the component selected based on the command arguments into the configuration.
public
setComponentInConfiguration() : null
Return values
null —_containsHordeYml()
Checks if the directory contains a .horde.yml file.
private
_containsHordeYml(string $path) : bool
Parameters
- $path : string
-
The path to the directory.
Return values
bool —True if the directory contains the file.
_containsPackageXml()
Checks if the directory contains a package.xml file.
private
_containsPackageXml(string $path) : bool
Parameters
- $path : string
-
The path to the directory.
Return values
bool —True if the directory contains a package.xml file.
_determineComponent()
Determine the requested component.
private
_determineComponent(array<string|int, mixed> $arguments) : array<string|int, mixed>
Parameters
- $arguments : array<string|int, mixed>
-
The arguments.
Return values
array<string|int, mixed> —Two elements: The selected component as Components_Component instance and optionally a string representing the path to the specified source component.
_isDirectory()
Checks if the provided directory is a directory.
private
_isDirectory(string $path) : bool
Parameters
- $path : string
-
The path to the directory.
Return values
bool —True if it is a directory
_isHordeYml()
Checks if the file name is a .horde.yml file.
private
_isHordeYml(string $path) : bool
Parameters
- $path : string
-
The path.
Return values
bool —True if the provided file name points to a .horde.yml file.
_isPackageXml()
Checks if the file name is a package.xml file.
private
_isPackageXml(string $path) : bool
Parameters
- $path : string
-
The path.
Return values
bool —True if the provided file name points to a package.xml file.