/** * Ensure that the component is available within the installation * environment. * * @param Components_Pear_Environment $environment The environment we * install into. * @param Components_Component $component The component that * should be installed. * @param array $options Install options. * @param string $reason Optional reason for * adding the package. * * @return NULL */ private function _installComponent(Components_Pear_Environment $environment, Components_Component $component, $options = array(), $reason = '') { if (empty($options['pretend'])) { $component->install($environment, $this->_getPerComponentOptions($component, $options), $reason); } else { $this->_output->ok(sprintf('Would install component %s%s.', $component->getName(), $reason)); } }