1 | <?php |
||
10 | class WordPress_GitHub_Sync_Persist_Client extends WordPress_GitHub_Sync_Base_Client { |
||
11 | |||
12 | /** |
||
13 | * Add a new commit to the master branch. |
||
14 | * |
||
15 | * @param WordPress_GitHub_Sync_Commit $commit Commit to create. |
||
16 | * |
||
17 | * @return bool|mixed|WordPress_GitHub_Sync_Commit|WP_Error |
||
18 | */ |
||
19 | 6 | public function commit( WordPress_GitHub_Sync_Commit $commit ) { |
|
51 | |||
52 | /** |
||
53 | * Create the tree by a set of blob ids. |
||
54 | * |
||
55 | * @param WordPress_GitHub_Sync_Tree $tree Tree to create. |
||
56 | * |
||
57 | * @return stdClass|WP_Error |
||
58 | */ |
||
59 | 5 | protected function create_tree( WordPress_GitHub_Sync_Tree $tree ) { |
|
62 | |||
63 | /** |
||
64 | * Create the commit from tree sha. |
||
65 | * |
||
66 | * @param WordPress_GitHub_Sync_Commit $commit Commit to create. |
||
67 | * |
||
68 | * @return mixed |
||
69 | */ |
||
70 | 4 | protected function create_commit( WordPress_GitHub_Sync_Commit $commit ) { |
|
79 | |||
80 | /** |
||
81 | * Updates the master branch to point to the new commit |
||
82 | * |
||
83 | * @param string $sha Sha for the commit for the master branch. |
||
84 | * |
||
85 | * @return mixed |
||
86 | */ |
||
87 | 3 | protected function set_ref( $sha ) { |
|
90 | |||
91 | /** |
||
92 | * Get the data for the current user. |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | 4 | protected function export_user() { |
|
119 | } |
||
120 |