Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be4d584

Browse files
committed
fix object bug
1 parent 2817b19 commit be4d584

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Console/Command/UpdateVclCommand.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,20 @@ class UpdateVclCommand extends Command
2929
/**
3030
* @param \Sectionio\Metrics\Helper\Aperture $aperture
3131
* @param \Sectionio\Metrics\Helper\State $state
32+
* @param \Sectionio\Metrics\Helper\Data $helper
3233
* @param \Magento\PageCache\Model\Config $pageCacheConfig
3334
*/
3435
public function __construct(
3536
\Sectionio\Metrics\Helper\Aperture $aperture,
3637
\Sectionio\Metrics\Helper\State $state,
38+
\Sectionio\Metrics\Helper\Data $helper,
3739
\Magento\PageCache\Model\Config $pageCacheConfig
3840
) {
3941
parent::__construct();
4042
$this->aperture = $aperture;
4143
$this->state = $state;
4244
$this->pageCacheConfig = $pageCacheConfig;
45+
$this->helper = $helper
4346
}
4447

4548
/**

Helper/Data.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,18 @@ public function clearDefaultApplication()
583583

584584
public function getProxyImage($account_id, $application_id)
585585
{
586+
/**generateApertureUrl takes an associative array */
586587
$parameters = array("accountId"=>$account_id, "applicationId"=>$application_id, "environmentName"=>"Production");
588+
589+
/** build the account url */
587590
$partial_url = $this->generateApertureUrl($parameters);
588591
$url = $partial_url . "/stack";
592+
589593
$curl_response = $this->performCurl($url);
590594
/** return response as an associative array */
591595
$response = json_decode($curl_response['body_content'], true);
592-
/** find object with name=varnish */
593-
error_log(print_r($curl_response,true));
596+
/** find object with name=varnish, grab the image */
597+
594598
$image;
595599
foreach($response as $proxy){
596600
if ($proxy['name'] == 'varnish') {

0 commit comments

Comments
 (0)