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