/**
  * Retrieve the object's configuration container, or one of its entry.
  *
  * If the object has no existing config, create one.
  *
  * If a key is provided, return the configuration key value instead of the full object.
  *
  * @param string $key Optional. If provided, the config key value will be returned, instead of the full object.
  * @see    self::create_config()
  * @return ConfigInterface
  */
 public function config($key = null)
 {
     if ($this->config === null) {
         $this->config = $this->createConfig();
     }
     if ($key !== null) {
         return $this->config->get($key);
     } else {
         return $this->config;
     }
 }
 /**
  * Retrieve the default elFinder Connector options.
  *
  * @link https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options
  *     Documentation for connector options.
  * @example https://gist.github.com/mcaskill/5944478b1894a5bf1349bfa699387cd4
  *     The Connector can be customized by defining a "elfinder" structure in
  *     your application's admin configuration.
  *
  * @param  array|null $extraOptions Additional settings to pass to elFinder.
  * @return array
  */
 public function connectorOptions(array $extraOptions = [])
 {
     if ($this->elfinderOptions === null || $extraOptions) {
         $options = $this->defaultConnectorOptions();
         if (isset($this->elfinderConfig['connector'])) {
             $options = array_replace_recursive($options, $this->elfinderConfig['connector'], $extraOptions);
         } else {
             /** @todo Remove this deprecation notice for the next release */
             $keys = $this->elfinderConfig->keys();
             if ($keys && array_intersect(['bind', 'plugin', 'roots'], $keys)) {
                 trigger_error('elFinder connector settings must be nested under [admin.elfinder.connector].', E_USER_DEPRECATED);
             }
         }
         if ($extraOptions) {
             $options = array_replace_recursive($options, $extraOptions);
         }
         if (isset($options['bind'])) {
             $options['bind'] = $this->resolveBoundCallbacks($options['bind']);
         }
         $this->elfinderOptions = $options;
     }
     return $this->elfinderOptions;
 }