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
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);
}
public function getFilename(): string
{
return Filter::forFilesystem($this->realName);
}