Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added retrieve_phlo_run #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/Plivo/Resources/PHLO/Phlo.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,15 @@ class Phlo
* @param null $id
* @param null $baseUrl
*/
public function __construct($client = null, $id = null, $baseUrl = null)

public function __construct($client = null, $id = null, $baseUrl = null, $runId = null)
{
$this->phloId = $id;
$this->runId = $runId;
$this->client = $client;
$this->baseUrl = $baseUrl;
$this->phloUrl = $this->baseUrl . "/phlo/" . $this->phloId;
$this->phlorunnerUrl = $this->baseUrl . "/phlo/" . $this->phloId. "/runs/" . $this->runId;
}

/**
Expand All @@ -92,6 +95,20 @@ public function getPhlo($id)
// return json_encode($response->getContent(), JSON_FORCE_OBJECT);
}

/**
* @param $id
* @param $runId
* @return mixed
*/

public function get_runner($id,$runId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

function name should be getRunner(). Follow the other function name

{
$phlo = new self($this->client, $id, $this->baseUrl, $runId);
$response = $phlo->client->getPhlorunner($phlo->phlorunnerUrl, []);
return $response->getContent();
//return json_encode($response->getContent(), JSON_FORCE_OBJECT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this commented code

}

/**
* @param null $nodeType
* @param null $nodeId
Expand Down