Пример #1
0
 /**
  * Returns the value of the given parameter.
  *
  * @param string $name The parameter name.
  *
  * @return mixed The parameter value.
  *
  * @throws NoSuchParameterException If the parameter was not found.
  */
 public function getParameterValue($name)
 {
     if (!isset($this->parameterValues[$name])) {
         throw NoSuchParameterException::forParameterName($name, $this->installerName);
     }
     return $this->parameterValues[$name];
 }
Пример #2
0
 /**
  * Returns an installer parameter.
  *
  * @param string $parameterName The parameter name.
  *
  * @return InstallerParameter The installer parameter.
  *
  * @throws NoSuchParameterException If the parameter does not exist.
  */
 public function getParameter($parameterName)
 {
     if (!isset($this->parameters[$parameterName])) {
         throw NoSuchParameterException::forParameterName($parameterName, $this->name);
     }
     return $this->parameters[$parameterName];
 }