public function getExtension()
    {
        if (is_null($this->extension) === true) {
            $filename = parent::getFilename();
            $str = new StringWrapper($filename);
            $this->extension = $str->getFirstEndMatch($this->predefinedExtensions);
            $this->hasPredefinedExt = true;

            if ($this->extension === '') {
                $this->hasPredefinedExt = false;
                $this->extension = parent::getExtension();
            }
        }

        return $this->extension;
    }
public function getExtension()
    {
        if (is_null($this->extension) === true) {
            $filename = parent::getFilename();
            $str = new StringWrapper($filename);
            $this->extension = $str->getFirstEndMatch($this->predefinedExtensions);
            $this->hasPredefinedExt = true;

            if ($this->extension === '') {
                $this->hasPredefinedExt = false;
                $this->extension = parent::getExtension();
            }
        }

        return $this->extension;
    }
public function getExtension ( ) { if ( is_null ( $ this -> extension ) === true ) { $ filename = parent :: getFilename ( ) ; $ str = new StringWrapper ( $ filename ) ; $ this -> extension = $ str -> getFirstEndMatch ( $ this -> predefinedExtensions ) ; $ this -> hasPredefinedExt = true ; if ( $ this -> extension === '' ) { $ this -> hasPredefinedExt = false ; $ this -> extension = parent :: getExtension ( ) ; } } return $ this -> extension ; }
Gets the extension of the file.

@return string
Gets the extension of the file .