public function replaceNameWithoutExtension($nameWithoutExtension)
    {
        $atoms = $this->nameAtoms();
        if (count($atoms) < 2) {
            return $this->replaceName($nameWithoutExtension);
        }

        array_splice($atoms, 0, -1, array($nameWithoutExtension));

        return $this->replaceName(implode(self::EXTENSION_SEPARATOR, $atoms));
    }
public function replaceNameWithoutExtension($nameWithoutExtension)
    {
        $atoms = $this->nameAtoms();
        if (count($atoms) < 2) {
            return $this->replaceName($nameWithoutExtension);
        }

        array_splice($atoms, 0, -1, array($nameWithoutExtension));

        return $this->replaceName(implode(self::EXTENSION_SEPARATOR, $atoms));
    }
public function replaceNameWithoutExtension ( $ nameWithoutExtension ) { $ atoms = $ this -> nameAtoms ( ) ; if ( count ( $ atoms ) < 2 ) { return $ this -> replaceName ( $ nameWithoutExtension ) ; } array_splice ( $ atoms , 0 , - 1 , array ( $ nameWithoutExtension ) ) ; return $ this -> replaceName ( implode ( self :: EXTENSION_SEPARATOR , $ atoms ) ) ; }
Replace this path's name, but keep the last extension.

@param string $nameWithoutExtension The replacement string.

@return PathInterface A new path instance with the supplied name replacing the portion of the existing name preceding the last extension.
Replace this path s name but keep the last extension .