INTERP_LEN
INTERP_LEN
The size of the interp line (fixed size)
insertCrc(string $buffer, string $crc) : string
Inserts or clears a CRC in a memory buffer
string | $buffer | The original buffer whose CRC will be overwritten |
string | $crc | If set, the CRC as an 8-char string (in hexadecimal). If not set, we clear the CRC (set it to '00000000'). |
The modified buffer
interpBlock(string $interp) : string
Builds an interpreter block from an interpreter string
Note: can be applied to a signed package as the signature ignores the interpreter block and the CRC.
string | $interp | Interpreter to set or empty string to clear |
Interpreter block (INTERP_LEN). Including trailing '\n'
setBufferInterp(string $path, string $interp = '') : string
Inserts a new interpreter block in a file's content
Allows a PHK user to change its interpreter string without having to use the \PHK\Build\Creator kit.
Note: can be applied to a signed package as the signature ignores the interpreter block and the CRC.
string | $path | PHK archive's path |
string | $interp | Interpreter string to set (empty to clear) |
The modified buffer (the file is not overwritten)