callsign = $data['callsign']; $this->path = rtrim($data['path'], '/'); $this->line = idx($data, 'line'); $this->commit = idx($data, 'commit'); } public function processRequest() { $repository = $this->loadRepositoryByCallsign($this->callsign); $browse_data = DiffusionBrowseQuery::newFromRepository( $repository, $this->path, $this->commit); $results = $browse_data->loadPaths(); if (!$results) { // TODO: useful output (path does not exist / never existed), or file // data. throw new Exception("No browse results."); } else { $browse_table = new DiffusionBrowseTableView(); $browse_table->setRepository($repository); $browse_table->setPaths($results); $browse_table->setRoot($this->path); $browse_table->setCommit($this->commit); $browse_panel = new AphrontPanelView(); $browse_panel->setHeader($this->path); $browse_panel->appendChild($browse_table); // TODO: Branch table } // TODO: Crumbs // TODO: Side nav return $this->buildStandardPageResponse( $browse_panel, array( 'title' => basename($this->path), )); } }