96 lines
2.1 KiB
PHP
96 lines
2.1 KiB
PHP
<?php
|
|
/**
|
|
* Copyright (C) 2020 Futurenext srl
|
|
*
|
|
* This file is part of Zakeke.
|
|
*
|
|
* Zakeke Interactive Product Designer can not be copied and/or distributed
|
|
* without the express permission of Futurenext srl
|
|
*
|
|
* @author Futurenext srl <help@zakeke.com>
|
|
* @copyright 2019 Futurenext srl
|
|
* @license https://www.zakeke.com/privacy/#general_conditions
|
|
*/
|
|
|
|
class WebserviceSpecificManagementZakekeCurrency implements WebserviceSpecificManagementInterface
|
|
{
|
|
/** @var WebserviceOutputBuilder */
|
|
protected $objOutput;
|
|
protected $output;
|
|
|
|
/** @var WebserviceRequest */
|
|
protected $wsObject;
|
|
|
|
/**
|
|
* @param WebserviceOutputBuilderCore $obj
|
|
*
|
|
* @return WebserviceSpecificManagementInterface
|
|
*/
|
|
public function setObjectOutput(WebserviceOutputBuilderCore $obj)
|
|
{
|
|
$this->objOutput = $obj;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function setWsObject(WebserviceRequestCore $obj)
|
|
{
|
|
$this->wsObject = $obj;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getWsObject()
|
|
{
|
|
return $this->wsObject;
|
|
}
|
|
|
|
public function getObjectOutput()
|
|
{
|
|
return $this->objOutput;
|
|
}
|
|
|
|
public function setUrlSegment($segments)
|
|
{
|
|
$this->urlSegment = $segments;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getUrlSegment()
|
|
{
|
|
return $this->urlSegment;
|
|
}
|
|
|
|
/**
|
|
* Management of Zakeke
|
|
*
|
|
*/
|
|
public function manage()
|
|
{
|
|
$objects = array(
|
|
'empty' => new Currency(Configuration::get('PS_CURRENCY_DEFAULT')),
|
|
new Currency(Configuration::get('PS_CURRENCY_DEFAULT'))
|
|
);
|
|
|
|
$this->output .= $this->objOutput->getContent(
|
|
$objects,
|
|
null,
|
|
'full',
|
|
0,
|
|
WebserviceOutputBuilder::VIEW_DETAILS,
|
|
false
|
|
);
|
|
}
|
|
|
|
/**
|
|
* This must be return a string with specific values as WebserviceRequest expects.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getContent()
|
|
{
|
|
return $this->objOutput->getObjectRender()->overrideContent($this->output);
|
|
}
|
|
}
|