1 | <?php |
||
31 | class CatFileCommand extends BaseCommand |
||
32 | { |
||
33 | const GIT_CAT_FILE = 'cat-file'; |
||
34 | |||
35 | /** |
||
36 | * constructor |
||
37 | * |
||
38 | * @param \GitElephant\Repository $repo The repository object this command |
||
39 | * will interact with |
||
40 | */ |
||
41 | 2 | public function __construct(Repository $repo = null) |
|
45 | |||
46 | /** |
||
47 | * command to show content of a Object at a given Treeish point |
||
48 | * |
||
49 | * @param \GitElephant\Objects\NodeObject $object a Object instance |
||
50 | * @param \GitElephant\Objects\TreeishInterface|string $treeish an object with TreeishInterface interface |
||
51 | * |
||
52 | * @throws \RuntimeException |
||
53 | * @return string |
||
54 | */ |
||
55 | 2 | public function content(NodeObject $object, $treeish): string |
|
66 | |||
67 | /** |
||
68 | * output an object content given it's sha |
||
69 | * |
||
70 | * @param string $sha |
||
71 | * |
||
72 | * @throws \RuntimeException |
||
73 | * @return string |
||
74 | */ |
||
75 | public function contentBySha($sha): string |
||
84 | } |
||
85 |