/** * Retrieve the saved tree we're building * or get the latest tree from the repo */ public function get_tree() { if (!empty($this->tree)) { return; } $tree = $this->api->last_tree_recursive(); if (is_wp_error($tree)) { WordPress_GitHub_Sync::write_log(__('Failed getting tree with error: ', WordPress_GitHub_Sync::$text_domain) . $tree->get_error_message()); return; } $this->tree = $tree; }
/** * Fetch the last tree from the repository. */ public function fetch_last() { $this->tree = $this->api->last_tree_recursive(); }