original_string: private function parseImports(\DOMDocument $xml, $file)
      {
          $xpath = new \DOMXPath($xml);
          $xpath->registerNamespace('container', self::NS);
  
          if (false === $imports = $xpath->query('//container:imports/container:import')) {
              return;
          }
  
          $defaultDirectory = \dirname($file);
          foreach ($imports as $import) {
              $this->setCurrentDir($defaultDirectory);
              $this->import($import->getAttribute('resource'), XmlUtils::phpize($import->getAttribute('type')) ?: null, (bool) XmlUtils::phpize($import->getAttribute('ignore-errors')), $file);
          }
      }
code: private function parseImports(\DOMDocument $xml, $file)
      {
          $xpath = new \DOMXPath($xml);
          $xpath->registerNamespace('container', self::NS);
  
          if (false === $imports = $xpath->query('//container:imports/container:import')) {
              return;
          }
  
          $defaultDirectory = \dirname($file);
          foreach ($imports as $import) {
              $this->setCurrentDir($defaultDirectory);
              $this->import($import->getAttribute('resource'), XmlUtils::phpize($import->getAttribute('type')) ?: null, (bool) XmlUtils::phpize($import->getAttribute('ignore-errors')), $file);
          }
      }
code_tokens: private function parseImports ( \ DOMDocument $ xml , $ file ) { $ xpath = new \ DOMXPath ( $ xml ) ; $ xpath -> registerNamespace ( 'container' , self :: NS ) ; if ( false === $ imports = $ xpath -> query ( '//container:imports/container:import' ) ) { return ; } $ defaultDirectory = \ dirname ( $ file ) ; foreach ( $ imports as $ import ) { $ this -> setCurrentDir ( $ defaultDirectory ) ; $ this -> import ( $ import -> getAttribute ( 'resource' ) , XmlUtils :: phpize ( $ import -> getAttribute ( 'type' ) ) ? : null , ( bool ) XmlUtils :: phpize ( $ import -> getAttribute ( 'ignore-errors' ) ) , $ file ) ; } }
docstring: Parses imports.
  
  @param \DOMDocument $xml
  @param string       $file
docstring_tokens: Parses imports .