original_string: protected function initializeResolver()
      {
          $extensions = $this->getCompiler()->getExtensions();
          $resolver = $this->resolver = new AggregateResolver();
      
          $stack = array($this->getView()->resolver());
          while ($source = array_shift($stack)) {
              if ($source instanceof AggregateResolver) {
                  foreach ($source as $child) {
                      array_push($stack, $child);
                  }
              } elseif ($source instanceof TemplatePathStack) {
                  foreach ($extensions as $extension) {
                      $child = clone $source;
                      $child->setDefaultSuffix($extension);
                      $resolver->attach($child);
                  }
              } else {
                  $resolver->attach($source);
              }
          }
      }
code: protected function initializeResolver()
      {
          $extensions = $this->getCompiler()->getExtensions();
          $resolver = $this->resolver = new AggregateResolver();
      
          $stack = array($this->getView()->resolver());
          while ($source = array_shift($stack)) {
              if ($source instanceof AggregateResolver) {
                  foreach ($source as $child) {
                      array_push($stack, $child);
                  }
              } elseif ($source instanceof TemplatePathStack) {
                  foreach ($extensions as $extension) {
                      $child = clone $source;
                      $child->setDefaultSuffix($extension);
                      $resolver->attach($child);
                  }
              } else {
                  $resolver->attach($source);
              }
          }
      }
code_tokens: protected function initializeResolver ( ) { $ extensions = $ this -> getCompiler ( ) -> getExtensions ( ) ; $ resolver = $ this -> resolver = new AggregateResolver ( ) ; $ stack = array ( $ this -> getView ( ) -> resolver ( ) ) ; while ( $ source = array_shift ( $ stack ) ) { if ( $ source instanceof AggregateResolver ) { foreach ( $ source as $ child ) { array_push ( $ stack , $ child ) ; } } elseif ( $ source instanceof TemplatePathStack ) { foreach ( $ extensions as $ extension ) { $ child = clone $ source ; $ child -> setDefaultSuffix ( $ extension ) ; $ resolver -> attach ( $ child ) ; } } else { $ resolver -> attach ( $ source ) ; } } }
docstring: Initializes Resolver to find files by mimicking the default template
  resolver and using compiler extensions.
docstring_tokens: Initializes Resolver to find files by mimicking the default template resolver and using compiler extensions .