Helpers
class Helpers
Utility methods for file I/O, path handling, annotation parsing, and shell escaping.
Methods
Reads entire file into a string.
Creates directory if it does not exist and deletes all its contents.
Finds the common ancestor directory of the given paths. All paths must exist.
Parses the first docblock in a string into an array of annotation values.
No description
Escapes a string for safe use as a shell argument.
No description
Details
at line 23
static string
readFile(string $file)
Reads entire file into a string.
at line 37
static void
purge(string $dir)
Creates directory if it does not exist and deletes all its contents.
at line 63
static string
findCommonDirectory(array $paths)
| internal |
Finds the common ancestor directory of the given paths. All paths must exist.
at line 95
static array
parseDocComment(string $s)
| internal |
Parses the first docblock in a string into an array of annotation values.
at line 125
static string
errorTypeToString(int $type)
| internal |
No description
at line 142
static string
escapeArg(string $s)
| internal |
Escapes a string for safe use as a shell argument.
at line 157
static string
prepareTempDir(string $path)
| internal |
No description