public function addExtension($extension)
    {
        if (($index = array_search($extension, $this->extensions)) !== false) {
            unset($this->extensions[$index]);
        }

        array_unshift($this->extensions, $extension);
    }
public function addExtension($extension)
    {
        if (($index = array_search($extension, $this->extensions)) !== false) {
            unset($this->extensions[$index]);
        }

        array_unshift($this->extensions, $extension);
    }
public function addExtension ( $ extension ) { if ( ( $ index = array_search ( $ extension , $ this -> extensions ) ) !== false ) { unset ( $ this -> extensions [ $ index ] ) ; } array_unshift ( $ this -> extensions , $ extension ) ; }
Register an extension with the view finder.

@param  string  $extension
@return void
Register an extension with the view finder .