src/MiniContainer/MiniContainerBase.php
protected function valueForKey($key) {
    // Attempt to create the non-existing service.
    $method = 'get_' . $key;
    if (!method_exists($this, $method)) {
      if (isset($this->defaults[$key])) {
        return $this->defaults[$key];
      }
      // Keys are only 'known' if there is a get_ method.
      throw new MiniContainerException(sprintf('Unknown key "%s".', $key));
    }
    return $this->$method();
  }
protected function valueForKey($key) {
    // Attempt to create the non-existing service.
    $method = 'get_' . $key;
    if (!method_exists($this, $method)) {
      if (isset($this->defaults[$key])) {
        return $this->defaults[$key];
      }
      // Keys are only 'known' if there is a get_ method.
      throw new MiniContainerException(sprintf('Unknown key "%s".', $key));
    }
    return $this->$method();
  }
protected function valueForKey ( $ key ) { // Attempt to create the non-existing service. $ method = 'get_' . $ key ; if ( ! method_exists ( $ this , $ method ) ) { if ( isset ( $ this -> defaults [ $ key ] ) ) { return $ this -> defaults [ $ key ] ; } // Keys are only 'known' if there is a get_ method. throw new MiniContainerException ( sprintf ( 'Unknown key "%s".' , $ key ) ) ; } return $ this -> $ method ( ) ; }
Determines a value for the given key.

@param string $key

@return mixed
Determines a value for the given key .