aEntry
MMO\git\classes · 1 symbol · generated 5 Oct 2026
aEntry
aEntry.php:14Anything git status can report on: a file (File), a submodule (Module) or the repository itself (Repository).
- Namespace
MMO\git\classes- Implements
- iEntry
Index
| filename | ||
| origin | ||
| parent | ||
| status | ||
| STATUS_TEXT static | ||
| addStatus($flags) | ||
| clearStatus($flags) | ||
| debugName() | ||
| getFilename() | ||
| getOrigin() | ||
| getParent() | ||
| getStatus() | ||
| getStatusText($sep) | ||
| relativeFilename() | The filename relative to the repository this entry belongs to. | |
| setOrigin($origin) | ||
| setParent($parent) | ||
| setStatus($flags, $origin) | Replace the status flags, and -- because git reports a rename's previous path alongside its status -- optionally the origin in the same call. | |
| StatusFlags($flags) static | Read the two-character <XY> field of a git status --porcelain=2 entry. | |
| StatusModuleFlags($flags) static | Read the four-character <sub> field of a git status --porcelain=2 entry (N... for a plain file, S<c><m><u> for a submodule). | |
| StatusText($status, $sep) static | Convert git status constants to text. | |
| __construct($filename, $status, $origin) |
Properties5
filename
- Type
- string
origin
parent
- Type
- null | Repository
status
- Type
- int
STATUS_TEXT
static- Type
- array
Methods16
addStatus($flags)
aEntry.php:116clearStatus($flags)
aEntry.php:121debugName()
aEntry.php:56| returns | string |
getFilename()
aEntry.php:61| returns | string |
getOrigin()
aEntry.php:86getParent()
aEntry.php:77| returns | null | Repository |
getStatus()
aEntry.php:95| returns | int |
getStatusText($sep)
aEntry.php:99relativeFilename()
aEntry.php:70The filename relative to the repository this entry belongs to. A standalone repository, having no parent, is its own root and answers with its absolute filename.
| returns | string |
setOrigin($origin)
aEntry.php:90setParent($parent)
aEntry.php:81| $parent | null | Repository | |
| returns | static |
setStatus($flags, $origin)
aEntry.php:110Replace the status flags, and -- because git reports a rename's previous path alongside its status -- optionally the origin in the same call.
StatusFlags($flags)
staticaEntry.php:147Read the two-character <XY> field of a git status --porcelain=2 entry.
StatusModuleFlags($flags)
staticaEntry.php:181Read the four-character <sub> field of a git status --porcelain=2 entry (N... for a plain file, S<c><m><u> for a submodule).
StatusText($status, $sep)
staticaEntry.php:133Convert git status constants to text.
| $status | int | a binary combination of the iEntry constants |
| $sep = ', ' | null | string | if null, returns the list of texts, else implodes it with this separator |
| returns | array | string |
__construct($filename, $status, $origin)
aEntry.php:50Inherited members (24)
| Constants | Declared by | Description | |
|---|---|---|---|
CAN_BE_ADDED | iEntry | ||
CAN_BE_COMMITED | iEntry | ||
COMMIT_CHANGED | iEntry | ||
ENTRY_STATUS | iEntry | ||
INDEX_ADDED | iEntry | ||
INDEX_COPIED | iEntry | ||
INDEX_DELETED | iEntry | ||
INDEX_IGNORED | iEntry | ||
INDEX_MODIFIED | iEntry | ||
INDEX_RENAMED | iEntry | ||
INDEX_UNMERGED | iEntry | ||
INDEX_UNTRACKED | iEntry | ||
MODULE_STATUS | iEntry | ||
TRACKED_CHANGES | iEntry | ||
UNKNOWN_ERROR | iEntry | ||
UNTRACKED_CHANGES | iEntry | ||
WORKTREE_ADDED | iEntry | ||
WORKTREE_COPIED | iEntry | ||
WORKTREE_DELETED | iEntry | ||
WORKTREE_IGNORED | iEntry | ||
WORKTREE_MODIFIED | iEntry | ||
WORKTREE_RENAMED | iEntry | ||
WORKTREE_UNMERGED | iEntry | ||
WORKTREE_UNTRACKED | iEntry |