Public Member Functions | |
| __construct ($dir) | |
| getObject ($name) | |
| Fetch an object in its PHP representation. | |
| getTip ($branch='master') | |
| Look up a branch. | |
Static Public Member Functions | |
| static | getTypeID ($name) |
| static | getTypeName ($type) |
Public Attributes | |
| $dir | |
| const | OBJ_NONE = 0 |
| const | OBJ_COMMIT = 1 |
| const | OBJ_TREE = 2 |
| const | OBJ_BLOB = 3 |
| const | OBJ_TAG = 4 |
| const | OBJ_OFS_DELTA = 6 |
| const | OBJ_REF_DELTA = 7 |
Protected Member Functions | |
| readFanout ($f, $object_name, $offset) | |
| Tries to find $object_name in the fanout table in $f at $offset. | |
| findPackedObject ($object_name) | |
| Try to find an object in a pack. | |
| applyDelta ($delta, $base) | |
| Apply the git delta $delta to the byte sequence $base. | |
| unpackObject ($pack, $object_offset) | |
| Unpack an object from a pack. | |
| getRawObject ($object_name) | |
| Fetch an object in its binary representation by name. | |
Related Functions | |
| (Note that these are not member functions.) | |
| sha1_bin ($hex) | |
| Convert a SHA-1 hash from hexadecimal to binary representation. | |
| sha1_hex ($bin) | |
| Convert a SHA-1 hash from binary to hexadecimal representation. | |
Definition at line 52 of file git.class.php.
| Git::__construct | ( | $ | dir | ) |
Definition at line 90 of file git.class.php.
| Git::applyDelta | ( | $ | delta, | |
| $ | base | |||
| ) | [protected] |
Apply the git delta $delta to the byte sequence $base.
| $delta | (string) the delta to apply | |
| $base | (string) the sequence to patch |
Definition at line 221 of file git.class.php.
| Git::findPackedObject | ( | $ | object_name | ) | [protected] |
Try to find an object in a pack.
| $object_name | (string) name of the object (binary SHA1) |
Definition at line 132 of file git.class.php.
| Git::getObject | ( | $ | name | ) |
Fetch an object in its PHP representation.
| $name | (string) name of the object (binary SHA1) |
Definition at line 390 of file git.class.php.
| Git::getRawObject | ( | $ | object_name | ) | [protected] |
Fetch an object in its binary representation by name.
Throws an exception if the object cannot be found.
| $object_name | (string) name of the object (binary SHA1) |
Definition at line 345 of file git.class.php.
| Git::getTip | ( | $ | branch = 'master' |
) |
Look up a branch.
| $branch | (string) The branch to look up, defaulting to master. |
Definition at line 405 of file git.class.php.
| static Git::getTypeID | ( | $ | name | ) | [static] |
Definition at line 64 of file git.class.php.
| static Git::getTypeName | ( | $ | type | ) | [static] |
Definition at line 77 of file git.class.php.
| Git::readFanout | ( | $ | f, | |
| $ | object_name, | |||
| $ | offset | |||
| ) | [protected] |
Tries to find $object_name in the fanout table in $f at $offset.
Definition at line 107 of file git.class.php.
| Git::unpackObject | ( | $ | pack, | |
| $ | object_offset | |||
| ) | [protected] |
Unpack an object from a pack.
| $pack | (resource) open .pack file | |
| $object_offset | (integer) offset of the object in the pack |
Definition at line 264 of file git.class.php.
| sha1_bin | ( | $ | hex | ) | [related] |
Convert a SHA-1 hash from hexadecimal to binary representation.
| $hex | (string) The hash in hexadecimal representation. |
Definition at line 35 of file git.class.php.
| sha1_hex | ( | $ | bin | ) | [related] |
Convert a SHA-1 hash from binary to hexadecimal representation.
| $bin | (string) The hash in binary representation. |
Definition at line 47 of file git.class.php.
| Git::$dir |
Definition at line 54 of file git.class.php.
| const Git::OBJ_BLOB = 3 |
Definition at line 59 of file git.class.php.
| const Git::OBJ_COMMIT = 1 |
Definition at line 57 of file git.class.php.
| const Git::OBJ_NONE = 0 |
Definition at line 56 of file git.class.php.
| const Git::OBJ_OFS_DELTA = 6 |
Definition at line 61 of file git.class.php.
| const Git::OBJ_REF_DELTA = 7 |
Definition at line 62 of file git.class.php.
| const Git::OBJ_TAG = 4 |
Definition at line 60 of file git.class.php.
| const Git::OBJ_TREE = 2 |
Definition at line 58 of file git.class.php.
1.5.9