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\Object $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(Object $object, $treeish) |
|
70 | |||
71 | /** |
||
72 | * output an object content given it's sha |
||
73 | * |
||
74 | * @param string $sha |
||
75 | * |
||
76 | * @throws \RuntimeException |
||
77 | * @return string |
||
78 | */ |
||
79 | public function contentBySha($sha) |
||
88 | } |
||
89 |