original_string: public function addExtension($extension)
      {
          if (($index = array_search($extension, $this->extensions)) !== false) {
              unset($this->extensions[$index]);
          }
  
          array_unshift($this->extensions, $extension);
      }
code: public function addExtension($extension)
      {
          if (($index = array_search($extension, $this->extensions)) !== false) {
              unset($this->extensions[$index]);
          }
  
          array_unshift($this->extensions, $extension);
      }
code_tokens: public function addExtension ( $ extension ) { if ( ( $ index = array_search ( $ extension , $ this -> extensions ) ) !== false ) { unset ( $ this -> extensions [ $ index ] ) ; } array_unshift ( $ this -> extensions , $ extension ) ; }
docstring: Register an extension with the view finder.
  
  @param  string  $extension
  @return void
docstring_tokens: Register an extension with the view finder .