コード例 #1
0
ファイル: APIProject.php プロジェクト: adrexia/deploynaut
 /**
  * 
  * @return SS_HTTPResponse
  */
 protected function createFetch()
 {
     $fetch = new DNGitFetch();
     $fetch->ProjectID = $this->record->ID;
     $fetch->write();
     $fetch->start();
     $location = Director::absoluteBaseURL() . $this->Link() . '/fetch/' . $fetch->ID;
     $output = array('message' => 'Ping queued as job ' . $fetch->ResqueToken, 'href' => $location);
     $response = $this->getAPIResponse($output);
     $response->setStatusCode(201);
     $response->addHeader('Location', $location);
     return $response;
 }