public function createFromDriveAndAtoms(
        $atoms,
        $drive = null,
        $isAbsolute = null,
        $isAnchored = null,
        $hasTrailingSeparator = null
    ) {
        if (null === $isAnchored) {
            $isAnchored = false;
        }
        if (null === $isAbsolute) {
            $isAbsolute = null !== $drive && !$isAnchored;
        }

        if ($isAbsolute && $isAnchored) {
            throw new InvalidPathStateException(
                'Absolute Windows paths cannot be anchored.'
            );
        }

        if ($isAbsolute) {
            return new AbsoluteWindowsPath(
                $drive,
                $atoms,
                $hasTrailingSeparator
            );
        }

        return new RelativeWindowsPath(
            $atoms,
            $drive,
            $isAnchored,
            $hasTrailingSeparator
        );
    }
public function createFromDriveAndAtoms(
        $atoms,
        $drive = null,
        $isAbsolute = null,
        $isAnchored = null,
        $hasTrailingSeparator = null
    ) {
        if (null === $isAnchored) {
            $isAnchored = false;
        }
        if (null === $isAbsolute) {
            $isAbsolute = null !== $drive && !$isAnchored;
        }

        if ($isAbsolute && $isAnchored) {
            throw new InvalidPathStateException(
                'Absolute Windows paths cannot be anchored.'
            );
        }

        if ($isAbsolute) {
            return new AbsoluteWindowsPath(
                $drive,
                $atoms,
                $hasTrailingSeparator
            );
        }

        return new RelativeWindowsPath(
            $atoms,
            $drive,
            $isAnchored,
            $hasTrailingSeparator
        );
    }
public function createFromDriveAndAtoms ( $ atoms , $ drive = null , $ isAbsolute = null , $ isAnchored = null , $ hasTrailingSeparator = null ) { if ( null === $ isAnchored ) { $ isAnchored = false ; } if ( null === $ isAbsolute ) { $ isAbsolute = null !== $ drive && ! $ isAnchored ; } if ( $ isAbsolute && $ isAnchored ) { throw new InvalidPathStateException ( 'Absolute Windows paths cannot be anchored.' ) ; } if ( $ isAbsolute ) { return new AbsoluteWindowsPath ( $ drive , $ atoms , $ hasTrailingSeparator ) ; } return new RelativeWindowsPath ( $ atoms , $ drive , $ isAnchored , $ hasTrailingSeparator ) ; }
Creates a new path instance from a set of path atoms and a drive
specifier.

@param mixed<string> $atoms                The path atoms.
@param string|null   $drive                The drive specifier.
@param boolean|null  $isAbsolute           True if the path is absolute.
@param boolean|null  $isAnchored           True if the path is anchored to the drive root.
@param boolean|null  $hasTrailingSeparator True if the path has a trailing separator.

@return WindowsPathInterface              The newly created path instance.
@throws InvalidPathAtomExceptionInterface If any of the supplied atoms are invalid.
@throws InvalidPathStateException         If the supplied arguments would produce an invalid path.
Creates a new path instance from a set of path atoms and a drive specifier .