File tree Expand file tree Collapse file tree 3 files changed +109
-0
lines changed
Expand file tree Collapse file tree 3 files changed +109
-0
lines changed Original file line number Diff line number Diff line change 1+ .. index ::
2+ single: getEntries (Git\T ree method)
3+
4+
5+ Git\\ Tree::getEntries
6+ ===========================================================
7+
8+ returns tree entry array.
9+
10+ Description
11+ ***********************************************************
12+
13+ public **Git\\ Tree::getEntries ** ()
14+
15+
16+ Parameters
17+ ***********************************************************
18+
19+ Return Values
20+ ***********************************************************
21+
22+ array Git\T ree\E ntry
23+
24+ Examples
25+ ***********************************************************
26+
27+ .. code-block::php
28+
29+ <?php
30+ $repo = new Git\Repository("/tmp/specified.git");
31+ $tree = $repo->getTree($repo->getCommit($repo->lookupRef("refs/heads/master")));
32+ $result = $tree->getEntries();
33+
34+ See Also
35+ ***********************************************************
Original file line number Diff line number Diff line change 1+ .. index ::
2+ single: getEntry (Git\T ree method)
3+
4+
5+ Git\\ Tree::getEntry
6+ ===========================================================
7+
8+ returns specified tree entry.
9+
10+ Description
11+ ***********************************************************
12+
13+ public **Git\\ Tree::getEntry ** (int *$offset * = 0)
14+
15+
16+ Parameters
17+ ***********************************************************
18+
19+ *offset *
20+ tree entry offset
21+
22+
23+ Return Values
24+ ***********************************************************
25+
26+ Git\T ree\E ntry
27+
28+ Examples
29+ ***********************************************************
30+
31+ .. code-block::php
32+
33+ <?php
34+ $repo = new Git\Repository("/tmp/specified.git");
35+ $tree = $repo->getTree($repo->getCommit($repo->lookupRef("refs/heads/master")));
36+ $result = $tree->getEntry(0);
37+
38+ See Also
39+ ***********************************************************
Original file line number Diff line number Diff line change 1+ .. index ::
2+ single: getIterator (Git\T ree method)
3+
4+
5+ Git\\ Tree::getIterator
6+ ===========================================================
7+
8+ IteratorAggregate interface.
9+
10+ Description
11+ ***********************************************************
12+
13+ public **Git\\ Tree::getIterator ** ()
14+
15+ Parameters
16+ ***********************************************************
17+
18+ Return Values
19+ ***********************************************************
20+
21+ Examples
22+ ***********************************************************
23+
24+ .. code-block::php
25+
26+ <?php
27+ $repo = new Git\Repository("/tmp/specified.git");
28+ $commit = $repo->getCommit($repo->lookupRef("refs/heads/master")->getId());
29+ $tree = $commit->getTree();
30+ foreach($tree->getIterator() as $entry){
31+ // something...
32+ }
33+
34+ See Also
35+ ***********************************************************
You can’t perform that action at this time.
0 commit comments