Gets options from configuration based on name.

@param  ContainerInterface $container
@param  string             $key
@param  null|string        $name
@return \Zend\Stdlib\AbstractOptions
@throws \RuntimeException
345242
public function getOptions(ContainerInterface $container, $key, $name = null)
    {
        if ($name === null) {
            $name = $this->getName();
        }

        $options = $container->get('config');
        $options = $options['doctrine'];
        if ($mappingType = $this->getMappingType()) {
            $options = $options[$mappingType];
        }
        $options = isset($options[$key][$name]) ? $options[$key][$name] : null;

        if (null === $options) {
            throw new RuntimeException(
                sprintf(
                    'Options with name "%s" could not be found in "doctrine.%s".',
                    $name,
                    $key
                )
            );
        }

        $optionsClass = $this->getOptionsClass();

        return new $optionsClass($options);
    }
593096
public function get($key, $name = null)
    {
        if ($name) {
            return array_key_exists($name, $this->config[$key]) ? $this->config[$key][$name] : null;
        } else {
            return $this->has($key) ? $this->config[$key] : null;
        }
    }
232585
private function injectBundleConfigurationParametersIntoContainer(
        ContainerBuilder $container,
        array $bundleConfiguration)
    {
        $parametersToInject = [
            'posts_directory',
        ];

        foreach ($parametersToInject as $parameter) {
            if (false === array_key_exists($parameter, $bundleConfiguration)) {
                throw new \RuntimeException("Expected bundle configuration to contain $parameter");
            }

            $parameterAlias = 'markdown_blog.'.$parameter;

            $container->setParameter($parameterAlias, $bundleConfiguration[$parameter]);
        }
    }
652504
protected function getContainer(): ContainerInterface
    {
        if (null === $this->container) {
            $app = $this->getApplication();

            if (!$app instanceof Application) {
                throw new \RuntimeException('Sculpin Application not found!');
            }

            $this->container = $app->getKernel()->getContainer();
        }

        return $this->container;
    }
448007
public function get($name)
    {
        $item = $this->getFactory($name)->get();

        if ($item instanceof ContainerAwareInterface) {
            $item->setContainer($this);
        }

        return $item;
    }
579964
public function getOption($key = null)
    {
        if (is_null($this->options)) {
            $this->preloadDefaults(true);
        }
        
        return $key === null ? $this->options : $this->options[$key];
    }
193014
public final function getOption($name)
    {
        return isset($this->_options[$name]) ? $this->_options[$name] : null;
    }
679493
public function getOptions($key = null)
    {
        if ($key == null) {
            return $this->options;
        } else {
            return $this->options[$key];
        }
    }
1128638
public function getContainer($name)
    {
        // try to match one of the container names with the passed name
        /** @var \AppserverIo\Psr\ApplicationServer\Configuration\ContainerConfigurationInterface $container */
        foreach ($this->getContainers() as $container) {
            if (fnmatch($name, $container->getName())) {
                return $container;
            }
        }
    }
1273106
public function getSetting($name, $key = null)
	{
		if( isset($this->_settings[$name]) )
		{
			if($key)
			{
				if(isset($this->_settings[$name][$key]))
				{
					return $this->_settings[$name][$key];
				}
			}
			else
			{
				return $this->_settings[$name];
			}
		}
		return null;
	}
67858
public function getOption($name) {
		$this->validateName($name);
		if (array_key_exists($name, $this->config))
			return $this->config[$name];
	
		return null;
	}
595178
protected function _parseItem(Container $container, $name)
    {
        try {
            $element = $container[$name];
        } catch (\Exception $e) {
            return null;
        }

        if (is_object($element)) {
            if ($element instanceof \Closure) {
                $type  = 'closure';
                $value = '';

            } elseif ($element instanceof Container) {
                $value = $this->_parseContainer($element);
                $type  = is_array($value) ? 'container' : 'class';

            } else {
                $type  = 'class';
                $value = get_class($element);
            }

        } elseif (is_array($element)) {
            $type  = 'array';
            $value = '';

        } elseif (is_string($element)) {
            $type  = 'string';
            $value = $element;

        } elseif (is_int($element)) {
            $type  = 'int';
            $value = $element;

        } elseif (is_float($element)) {
            $type  = 'float';
            $value = $element;

        } elseif (is_bool($element)) {
            $type  = 'bool';
            $value = $element;

        } elseif ($element === null) {
            $type  = 'null';
            $value = '';

        } else {
            $type  = 'unknown';
            $value = gettype($element);
        }

        return array(
            'name'  => $name,
            'type'  => $type,
            'value' => $value,
        );
    }
1174465
public function getOption($name)
  {
    if ($this->hasOption($name)) {
      $option = $this->options[$name];
    } else {
      $option = null;
    }
    return $option;
  }
570528
protected function getOption($key)
    {
        if (!isset($this->options[$key])) {
            return null;
        }

        return $this->options[$key];
    }
729511
public static function getOption($name = null)
    {
        if (null === $name) {
            return self::$_options;
        } else {
            return isset(self::$_options[$name])? self::$_options[$name]: null;
        }
    }
614440
public function getOption($name) {
		if (array_key_exists($name, $this->configuration)) {
			return $this->configuration[$name];
		}
		
		return null;
	}
1045185
public function container($name)
    {
        if (!isset($this->container[$name])) {
            $this->container[$name] = IOC::resolve($name);
        }

        return $this->container[$name];
    }