Implement user drive information
This commit is contained in:
committed by
Phil Davis
parent
46575abe11
commit
e15afb04d4
@@ -26,16 +26,43 @@ class GraphHelper {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getUUIDv4Regex(): string {
|
||||
return '[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return int (1 = true | 0 = false)
|
||||
*/
|
||||
public static function isUUIDv4(string $id): int {
|
||||
$regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';
|
||||
$regex = "/^" . self::getUUIDv4Regex() . "/i";
|
||||
return preg_match($regex, $id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $spaceId
|
||||
*
|
||||
* @return int (1 = true | 0 = false)
|
||||
*/
|
||||
public static function isSpaceId(string $spaceId): int {
|
||||
$regex = "/^" . self::getUUIDv4Regex() . '\\$' . self::getUUIDv4Regex() . "/i";
|
||||
return preg_match($regex, $spaceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function isUUIDv44(string $id): string {
|
||||
return "hello";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $baseUrl
|
||||
* @param string $path
|
||||
|
||||
Reference in New Issue
Block a user