protected function validateFileName($fileName)
    {
        if (!FileHelper::validatePath($fileName, $this->maxNesting)) {
            throw new ApplicationException(Lang::get('cms::lang.cms_object.invalid_file', [
                'name' => $fileName
            ]));
        }

        if (!strlen(File::extension($fileName))) {
            $fileName .= '.'.$this->defaultExtension;
        }

        return $fileName;
    }
protected function validateFileName($fileName)
    {
        if (!FileHelper::validatePath($fileName, $this->maxNesting)) {
            throw new ApplicationException(Lang::get('cms::lang.cms_object.invalid_file', [
                'name' => $fileName
            ]));
        }

        if (!strlen(File::extension($fileName))) {
            $fileName .= '.'.$this->defaultExtension;
        }

        return $fileName;
    }
protected function validateFileName ( $ fileName ) { if ( ! FileHelper :: validatePath ( $ fileName , $ this -> maxNesting ) ) { throw new ApplicationException ( Lang :: get ( 'cms::lang.cms_object.invalid_file' , [ 'name' => $ fileName ] ) ) ; } if ( ! strlen ( File :: extension ( $ fileName ) ) ) { $ fileName .= '.' . $ this -> defaultExtension ; } return $ fileName ; }
Checks the supplied file name for validity.
@param string  $fileName
@return string
Checks the supplied file name for validity .