src/Option/FilenameTrait.php
protected function setFilenameOption($filename): void
    {
        if (is_string($filename)) {
            $filename = new BasicFilename($filename);
        }

        if (!is_callable($filename)) {
            throw new TypeError("Filename should be a string or callable");
        }

        $this->filename = $filename;
    }
protected function setFilenameOption($filename): void
    {
        if (is_string($filename)) {
            $filename = new BasicFilename($filename);
        }

        if (!is_callable($filename)) {
            throw new TypeError("Filename should be a string or callable");
        }

        $this->filename = $filename;
    }
protected function setFilenameOption ( $ filename ) : void { if ( is_string ( $ filename ) ) { $ filename = new BasicFilename ( $ filename ) ; } if ( ! is_callable ( $ filename ) ) { throw new TypeError ( "Filename should be a string or callable" ) ; } $ this -> filename = $ filename ; }
Filename format or callable.
The filename format will be applied using sprintf, replacing `%s` with the key.

@param string|callable $filename
@return void
Filename format or callable . The filename format will be applied using sprintf replacing %s with the key .