original_string: public function get($file, $values = null, array &$imported = array())
      {
          if ((null !== $values) && (false === is_array($values))) {
              if (false === ($values instanceof ArrayAccess)) {
                  throw new InvalidArgumentException(
                      'The value of $values is not an array or an instance of ArrayAccess.'
                  );
              }
          }
  
          if (null !== $values) {
              $values = $this->mergeValues($this->values, $values);
          } else {
              $values = $this->values;
          }
  
          $new = dirname($file) . DIRECTORY_SEPARATOR . $this->prefix . basename($file);
  
          try {
              $found = $this->locator->locate($new);
          } catch (InvalidArgumentException $first) {
              if (empty($this->prefix)) {
                  throw $first;
              }
  
              try {
                  $found = $this->locator->locate($file);
              } catch (InvalidArgumentException $second) {
                  throw $first;
              }
          }
  
          if (in_array($found, $imported)) {
              throw new LogicException(sprintf(
                  'Circular dependency detected for: %s',
                  $found
              ));
          }
  
          $imported[] = $found;
  
          if (false === empty($this->cache)) {
              $cache = new ConfigCache(
                  $this->cache . DIRECTORY_SEPARATOR . $file . '.php',
                  $this->debug
              );
  
              if ($cache->isFresh()) {
                  return $this->import(require $cache, $values, $imported);
              }
          }
  
          if (false === ($loader = $this->resolver->resolve($file))) {
              throw new InvalidArgumentException(sprintf(
                  'No loader available for file: %s',
                  $file
              ));
          }
  
          $loader->setValues($values);
  
          $data = $loader->load($found);
  
          if (isset($cache)) {
              $cache->write(
                  '<?php return ' . var_export($data, true) . ';',
                  array(new FileResource($found))
              );
          }
  
          return $this->import($data, $values, $imported);
      }
code: public function get($file, $values = null, array &$imported = array())
      {
          if ((null !== $values) && (false === is_array($values))) {
              if (false === ($values instanceof ArrayAccess)) {
                  throw new InvalidArgumentException(
                      'The value of $values is not an array or an instance of ArrayAccess.'
                  );
              }
          }
  
          if (null !== $values) {
              $values = $this->mergeValues($this->values, $values);
          } else {
              $values = $this->values;
          }
  
          $new = dirname($file) . DIRECTORY_SEPARATOR . $this->prefix . basename($file);
  
          try {
              $found = $this->locator->locate($new);
          } catch (InvalidArgumentException $first) {
              if (empty($this->prefix)) {
                  throw $first;
              }
  
              try {
                  $found = $this->locator->locate($file);
              } catch (InvalidArgumentException $second) {
                  throw $first;
              }
          }
  
          if (in_array($found, $imported)) {
              throw new LogicException(sprintf(
                  'Circular dependency detected for: %s',
                  $found
              ));
          }
  
          $imported[] = $found;
  
          if (false === empty($this->cache)) {
              $cache = new ConfigCache(
                  $this->cache . DIRECTORY_SEPARATOR . $file . '.php',
                  $this->debug
              );
  
              if ($cache->isFresh()) {
                  return $this->import(require $cache, $values, $imported);
              }
          }
  
          if (false === ($loader = $this->resolver->resolve($file))) {
              throw new InvalidArgumentException(sprintf(
                  'No loader available for file: %s',
                  $file
              ));
          }
  
          $loader->setValues($values);
  
          $data = $loader->load($found);
  
          if (isset($cache)) {
              $cache->write(
                  '<?php return ' . var_export($data, true) . ';',
                  array(new FileResource($found))
              );
          }
  
          return $this->import($data, $values, $imported);
      }
code_tokens: public function get ( $ file , $ values = null , array & $ imported = array ( ) ) { if ( ( null !== $ values ) && ( false === is_array ( $ values ) ) ) { if ( false === ( $ values instanceof ArrayAccess ) ) { throw new InvalidArgumentException ( 'The value of $values is not an array or an instance of ArrayAccess.' ) ; } } if ( null !== $ values ) { $ values = $ this -> mergeValues ( $ this -> values , $ values ) ; } else { $ values = $ this -> values ; } $ new = dirname ( $ file ) . DIRECTORY_SEPARATOR . $ this -> prefix . basename ( $ file ) ; try { $ found = $ this -> locator -> locate ( $ new ) ; } catch ( InvalidArgumentException $ first ) { if ( empty ( $ this -> prefix ) ) { throw $ first ; } try { $ found = $ this -> locator -> locate ( $ file ) ; } catch ( InvalidArgumentException $ second ) { throw $ first ; } } if ( in_array ( $ found , $ imported ) ) { throw new LogicException ( sprintf ( 'Circular dependency detected for: %s' , $ found ) ) ; } $ imported [ ] = $ found ; if ( false === empty ( $ this -> cache ) ) { $ cache = new ConfigCache ( $ this -> cache . DIRECTORY_SEPARATOR . $ file . '.php' , $ this -> debug ) ; if ( $ cache -> isFresh ( ) ) { return $ this -> import ( require $ cache , $ values , $ imported ) ; } } if ( false === ( $ loader = $ this -> resolver -> resolve ( $ file ) ) ) { throw new InvalidArgumentException ( sprintf ( 'No loader available for file: %s' , $ file ) ) ; } $ loader -> setValues ( $ values ) ; $ data = $ loader -> load ( $ found ) ; if ( isset ( $ cache ) ) { $ cache -> write ( '<?php return ' . var_export ( $ data , true ) . ';' , array ( new FileResource ( $ found ) ) ) ; } return $ this -> import ( $ data , $ values , $ imported ) ; }
docstring: Returns the data for the configuration file.
  
  @param string       $file      The file name.
  @param array|object $values    The new replacement values.
  @param array        &$imported The list of imported resources.
  
  @return array The configuration data.
  
  @throws InvalidArgumentException If the value is not supported.
  @throws LogicException           If a circular dependency is detected.
docstring_tokens: Returns the data for the configuration file .