Programming Language PHP

Namespace Elabftw\Services

Class Filter

Method/Function forFilesystem

Total Examples 2

2 code examples of PHP Elabftw\Services\Filter::forFilesystem extracted from open source projects

Was this example useful?
0
                                                    private function getRealName(): string
    {
        // don't allow php extension
        $ext = Tools::getExt($this->content);
        if ($ext === 'php') {
            throw new ImproperActionException('No php extension allowed!');
        }
        return Filter::forFilesystem($this->content);
    }
                                            
Was this example useful?
0
                                                    public function getFilename(): string
    {
        return Filter::forFilesystem($this->realName);
    }