- Class name: WebserviceRequestCore
- Source: classes/webservice/WebserviceRequest.php line 27
- $_authenticated
- $_available_languages
- $_docUrl
- $_inputXml
- $_instance
- $_key
- $_object
- $_outputEnabled
- $_startTime
- $depth
- $errors
- $fieldsToDisplay
- $keyPermissions
- $method
- $objOutput
- $objectSpecificManagement
- $objects
- $outputFormat
- $resourceConfiguration
- $resourceList
- $schemaToDisplay
- $shopIDs
- $specificOutput
- $urlFragments
- $urlSegment
- $wsUrl
- $ws_current_classname
- authenticate
- checkHTTPMethod
- checkResource
- executeEntityDelete
- executeEntityGetAndHead
- executeEntityPost
- executeEntityPut
- fetch
- filterLanguage
- getClosest
- getFilteredObjectDetails
- getFilteredObjectList
- getInstance
- getOutputEnabled
- getOutputObject
- getPriceForProduct
- getResources
- getSQLRetrieveFilter
- getallheaders
- groupShopExists
- hasErrors
- isActivated
- manageFilters
- parseDisplayFields
- returnOutput
- saveEntityFromXml
- setError
- setErrorDidYouMean
- setFieldsToDisplay
- setObjects
- setOutputEnabled
- shopExists
- shopHasRight
- specificPriceCalculation
- specificPriceForCombination
- specificPriceForProduct
- webserviceChecks
- webserviceErrorHandler
const HTTP_GET = 1
const HTTP_POST = 2
const HTTP_PUT = 4
protected boolean $_authenticated = false
Set if the authentication key was checked
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 68.
protected mixed $_available_languages = null
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 33.
protected string $_docUrl = 'http://doc.prestashop.com/display/PS16/Using+the+PrestaShop+Web+Service'
PrestaShop Webservice Documentation URL
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 62.
protected string $_inputXml
If we are in PUT or POST case, we use this attribute to store the xml string value during process
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 147.
protected \WebserviceRequest $_instance
Object instance for singleton
- Visibility: protected
- This property is static.
- Source: classes/webservice/WebserviceRequest.php line 153.
protected string $_key
Key used for authentication
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 159.
protected \ObjectModel $_object
The current object to support, it extends the PrestaShop ObjectModel
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 128.
protected boolean $_outputEnabled = true
Set if return should display content or not
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 44.
protected integer $_startTime
The time in microseconds of the start of the execution of the web service request
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 92.
public integer $depth
This is used to have a deeper tree diagram.
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 165.
public array $errors = array()
Errors triggered at execution
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 38.
public string $fieldsToDisplay = 'minimum'
The fields to display. These fields will be displayed when retrieving objects
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 141.
public array $keyPermissions
The permissions for the current key
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 110.
public string $method
HTTP Method to support
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 74.
protected \WebserviceOutputBuilder $objOutput
The object to build the output.
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 177.
protected \WebserviceSpecificManagementImages $objectSpecificManagement = false
Set if the management is specific or if it is classic (entity management)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 50.
public array $objects
The list of objects to display
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 122.
protected string $outputFormat = 'xml'
Name of the output format
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 171.
public array $resourceConfiguration
The configuration parameters of the current resource
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 104.
public array $resourceList
The list of each resources manageable via web service
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 98.
public string $schemaToDisplay
The schema to display.
If null, no schema have to be displayed and normal management has to be performed
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 135.
public mixed $shopIDs
- Visibility: public
- This property is static.
- Source: classes/webservice/WebserviceRequest.php line 186.
protected string $specificOutput = ''
The XML string to display if web service call succeed
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 116.
public array $urlFragments = array()
The segment list of the URL after the "api" segment
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 86.
public array $urlSegment = array()
The segment of the URL
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 80.
public string $wsUrl
Base PrestaShop webservice URL
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 56.
public string $ws_current_classname
Save the class name for override used in getInstance()
- Visibility: public
- This property is static.
- Source: classes/webservice/WebserviceRequest.php line 183.
boolean WebserviceRequestCore::authenticate()
Check request authentication
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 726
boolean WebserviceRequestCore::checkHTTPMethod()
Check HTTP method
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 847
boolean WebserviceRequestCore::checkResource()
Check resource validity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 865
boolean WebserviceRequestCore::executeEntityDelete()
Execute DELETE method on a PrestaShop entity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1360
boolean WebserviceRequestCore::executeEntityGetAndHead()
Execute GET and HEAD requests
Build filter Build fields display Build sort Build limit
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 1318
boolean WebserviceRequestCore::executeEntityPost()
Execute POST method on a PrestaShop entity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1340
boolean WebserviceRequestCore::executeEntityPut()
Execute PUT method on a PrestaShop entity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1350
array WebserviceRequestCore::fetch(string $key, string $method, string $url, string $params, $bad_class_name, string $inputXml)
Start Webservice request Check webservice activation Check autentication Check resource Check HTTP Method Execute the action Display the result
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 425
- $key string
- $method string
- $url string
- $params string
- $bad_class_name mixed
- $inputXml string
mixed WebserviceRequestCore::filterLanguage()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 1666
string WebserviceRequestCore::getClosest(string $input, array $words)
Return the nearest value picked in the values list
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 610
- $input string
- $words array
mixed WebserviceRequestCore::getFilteredObjectDetails()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 1262
mixed WebserviceRequestCore::getFilteredObjectList()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 1228
object WebserviceRequestCore::getInstance()
Get WebserviceRequest object instance (Singleton)
- Visibility: public
- This method is static.
- Source: classes/webservice/WebserviceRequest.php line 206
mixed WebserviceRequestCore::getOutputEnabled()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 189
mixed WebserviceRequestCore::getOutputObject($type)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 226
- $type mixed
array WebserviceRequestCore::getPriceForProduct($field, $entity_object, $ws_params)
This method is used for calculate the price for products on the output details
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 338
- $field mixed
- $entity_object mixed
- $ws_params mixed
mixed WebserviceRequestCore::getResources()
- Visibility: public
- This method is static.
- Source: classes/webservice/WebserviceRequest.php line 253
string WebserviceRequestCore::getSQLRetrieveFilter(string $sqlId, string $filterValue, string $tableAlias)
get SQL retrieve Filter
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1623
- $sqlId string
- $filterValue string
- $tableAlias string - = 'main.'
mixed WebserviceRequestCore::getallheaders()
- Visibility: public
- This method is static.
- Source: classes/webservice/WebserviceRequest.php line 1839
mixed WebserviceRequestCore::groupShopExists($params)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 825
- $params mixed
boolean WebserviceRequestCore::hasErrors()
Check if there is one or more error
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 716
boolean WebserviceRequestCore::isActivated()
Check webservice activation
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 769
mixed WebserviceRequestCore::manageFilters()
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1014
mixed WebserviceRequestCore::parseDisplayFields($str)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 920
- $str mixed
array WebserviceRequestCore::returnOutput()
Thanks to the (WebserviceOutputBuilder) WebserviceKey::objOutput Method build the output depend on the WebserviceRequest::outputFormat and set HTTP header parameters.
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1730
boolean WebserviceRequestCore::saveEntityFromXml(integer $successReturnCode)
save Entity Object from XML
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1419
- $successReturnCode integer
void WebserviceRequestCore::setError(integer $status, string $label, integer $code)
Set a webservice error
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 578
- $status integer
- $label string
- $code integer
void WebserviceRequestCore::setErrorDidYouMean(integer $num, string $label, array $value, $available_values, integer $code)
Set a webservice error and propose a new value near from the available values
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 598
- $num integer
- $label string
- $value array
- $available_values mixed
- $code integer
mixed WebserviceRequestCore::setFieldsToDisplay()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 962
mixed WebserviceRequestCore::setObjects()
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 888
mixed WebserviceRequestCore::setOutputEnabled($bool)
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 194
- $bool mixed
mixed WebserviceRequestCore::shopExists($params)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 796
- $params mixed
mixed WebserviceRequestCore::shopHasRight($key)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 779
- $key mixed
mixed WebserviceRequestCore::specificPriceCalculation($parameters)
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 364
- $parameters mixed
array WebserviceRequestCore::specificPriceForCombination($entity_object, array $parameters)
This method is used for calculate the price for products on a virtual fields
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 397
- $entity_object mixed
- $parameters array
array WebserviceRequestCore::specificPriceForProduct($entity_object, array $parameters)
This method is used for calculate the price for products on a virtual fields
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 356
- $entity_object mixed
- $parameters array
mixed WebserviceRequestCore::webserviceChecks()
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 565
boolean WebserviceRequestCore::webserviceErrorHandler(string $errno, array $errstr, array $errfile, array $errline)
Used to replace the default PHP error handler, in order to display PHP errors in a XML format
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 640
- $errno string - contains the level of the error raised, as an integer
- $errstr array - contains the error message, as a string
- $errfile array - errfile, which contains the filename that the error was raised in, as a string
- $errline array - errline, which contains the line number the error was raised at, as an integer