public static function fromString(string $id): ID
    {
        $uuid_format = '/^[0-9A-F]{32}$/i';
        if(!preg_match($uuid_format, $id)) {
            throw new Exceptions\MalformedIDException($id);
        }
        return new ID($id);
    }
public static function fromString(string $id): ID
    {
        $uuid_format = '/^[0-9A-F]{32}$/i';
        if(!preg_match($uuid_format, $id)) {
            throw new Exceptions\MalformedIDException($id);
        }
        return new ID($id);
    }
public static function fromString ( string $ id ) : ID { $ uuid_format = '/^[0-9A-F]{32}$/i' ; if ( ! preg_match ( $ uuid_format , $ id ) ) { throw new Exceptions \ MalformedIDException ( $ id ) ; } return new ID ( $ id ) ; }
Loads a Pho ID with the given string

Checks the validity of the string and throws an exception if it is not valid.

@param string $id Must consist of 32 hexadecimal characters.

@return ID The ID in object format

@throws Exceptions\MalformedIDException thrown when the given ID is not a valid UUIDv4
Loads a Pho ID with the given string