| [ Index ] |
PHP Cross Reference of PHK Manager |
[Source view] [Print] [Project Stats]
(no description)
| Copyright: | Francois Laupretre <phk@tekwire.net> |
| License: | http://www.apache.org/licenses/LICENSE-2.0 Apache License, V 2.0 |
| File Size: | 554 lines (13 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Proxy:: (27 methods):
__construct()
crcCheck()
insertCrc()
getCrc()
computeCrc()
checkCrcBuffer()
fixCrc()
fileIsPackage()
dataIsPackage()
getMagicValues()
magicField()
cacheData()
clearCache()
pathList()
sectionList()
signed()
interp()
interpBlock()
setBufferInterp()
version()
path()
section()
ftree()
stree()
flags()
displayPackages()
showfiles()
| __construct($path,$flags) X-Ref |
| Constructor This method must be called only from PHK\Mgr::proxy() param: string mount point |
| crcCheck() X-Ref |
| No description |
| insertCrc($buffer,$crc) X-Ref |
| Inserts or clears a CRC in a memory buffer param: string $buffer The original buffer whose CRC will be overwritten param: string $crc If set, the CRC as an 8-char string (in hexadecimal). If return: string The modified buffer |
| getCrc($buffer) X-Ref |
| Returns the CRC extracted from a memory buffer (not the computed one) param: string $buffer return: string The extracted 8-char hex CRC |
| computeCrc($buffer) X-Ref |
| Computes a CRC from a given memory buffer As the given buffer already contains a CRC, we first clear it. param: string $buffer return: string The computed 8-char hex CRC |
| checkCrcBuffer($buffer) X-Ref |
| Checks a memory buffer's CRC The memory buffer is supposed to contain a whole PHK archive. No return value: if the CRC check fails, an exception is thrown. param: string $buffer return: void |
| fixCrc($buffer) X-Ref |
| Computes and inserts a CRC in a memory buffer param: string $buffer return: string The modified buffer |
| fileIsPackage($path) X-Ref |
| Check if a given path contains a PHK package param: string $path path to check (can be virtual) return: boolean |
| dataIsPackage($data) X-Ref |
| Check if a data buffer contains a PHK package param: string $data data buffer to check return: boolean |
| getMagicValues() X-Ref |
| Extracts the values out of a magic line buffer Note: A package is signed if (Signature offset != File size) param: string $buf A magic line content return: array An array containing the magic values |
| magicField($name) X-Ref |
| No description |
| cacheData() X-Ref |
| Brings all data in memory After this function has run, we never access the package file any more. return: void |
| clearCache() X-Ref |
| Clears the data cache return: void |
| pathList() X-Ref |
| No description |
| sectionList() X-Ref |
| No description |
| signed() X-Ref |
| Is this package digitally signed ? return: boolean |
| interp() X-Ref |
| Gets interpreter string If the interpreter is defined, returns it. Else, returns an empty string return: string |
| interpBlock($interp) X-Ref |
| 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. param: string $interp Interpreter to set or empty string to clear return: string Interpreter block (INTERP_LEN). Including trailing '\n' |
| setBufferInterp($path,$interp='') X-Ref |
| 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. param: string $path PHK archive's path param: string $interp Interpreter string to set (empty to clear) return: string The modified buffer (the file is not overwritten) |
| version() X-Ref |
| The version of the \PHK\Build\Creator tool this package was created from return: string Version |
| path() X-Ref |
| Returns the $path property return: string |
| section($name) X-Ref |
| Get a section's content param: string $name The section name return: string The section's content |
| ftree() X-Ref |
| No description |
| stree() X-Ref |
| No description |
| flags() X-Ref |
| Returns the $flags property return: integer |
| displayPackages() X-Ref |
| No description |
| showfiles() X-Ref |
| No description |
| Generated: Thu Jun 4 18:33:15 2015 | Cross-referenced by PHPXref 0.7.1 |