public static function parse(string $filePath): FilePathInterface
    {
        if (!self::myFilePathParse(
            DIRECTORY_SEPARATOR,
            $filePath,
            function ($p, $d, &$e) {
                return self::myPartValidator($p, $d, $e);
            },
            null,
            $isAbsolute,
            $aboveBaseLevel,
            $drive,
            $directoryParts,
            $filename,
            $error)
        ) {
            throw new FilePathInvalidArgumentException('File path "' . $filePath . '" is invalid: ' . $error);
        }

        return new self($isAbsolute, $aboveBaseLevel, $drive, $directoryParts, $filename);
    }
public static function parse(string $filePath): FilePathInterface
    {
        if (!self::myFilePathParse(
            DIRECTORY_SEPARATOR,
            $filePath,
            function ($p, $d, &$e) {
                return self::myPartValidator($p, $d, $e);
            },
            null,
            $isAbsolute,
            $aboveBaseLevel,
            $drive,
            $directoryParts,
            $filename,
            $error)
        ) {
            throw new FilePathInvalidArgumentException('File path "' . $filePath . '" is invalid: ' . $error);
        }

        return new self($isAbsolute, $aboveBaseLevel, $drive, $directoryParts, $filename);
    }
public static function parse ( string $ filePath ) : FilePathInterface { if ( ! self :: myFilePathParse ( DIRECTORY_SEPARATOR , $ filePath , function ( $ p , $ d , & $ e ) { return self :: myPartValidator ( $ p , $ d , $ e ) ; } , null , $ isAbsolute , $ aboveBaseLevel , $ drive , $ directoryParts , $ filename , $ error ) ) { throw new FilePathInvalidArgumentException ( 'File path "' . $ filePath . '" is invalid: ' . $ error ) ; } return new self ( $ isAbsolute , $ aboveBaseLevel , $ drive , $ directoryParts , $ filename ) ; }
Parses a file path.

@since 1.0.0

@param string $filePath The file path.

@throws FilePathInvalidArgumentException If the $filePath parameter is not a valid file path.

@return FilePathInterface The file path instance.
Parses a file path .