public function extension($extension)
    {
        if (is_string($extension)) {
            $this->extension = ltrim($extension, '.');
        } else {
            $this->extension = null;
        }

        return $this;
    }
public function extension($extension)
    {
        if (is_string($extension)) {
            $this->extension = ltrim($extension, '.');
        } else {
            $this->extension = null;
        }

        return $this;
    }
public function extension ( $ extension ) { if ( is_string ( $ extension ) ) { $ this -> extension = ltrim ( $ extension , '.' ) ; } else { $ this -> extension = null ; } return $ this ; }
The filename extension to use.

@param string|null $extension
@return $this
The filename extension to use .