- Class name: WebserviceRequestCore
- Source: classes/webservice/WebserviceRequest.php line 28
- $_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
- hasErrors
- isActivated
- manageFilters
- parseDisplayFields
- returnOutput
- saveEntityFromXml
- setError
- setErrorDidYouMean
- setFieldsToDisplay
- setObjects
- setOutputEnabled
- shopExists
- shopHasRight
- specificPriceCalculation
- specificPriceForCombination
- specificPriceForProduct
- webserviceChecks
- webserviceErrorHandler
protected boolean $_authenticated = false
Set if the authentication key was checked
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 65.
protected mixed $_available_languages = null
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 30.
protected string $_docUrl = 'http://doc.prestashop.com/display/PS14/Using+the+REST+webservice'
PrestaShop Webservice Documentation URL
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 59.
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 144.
protected \WebserviceRequest $_instance
Object instance for singleton
- Visibility: protected
- This property is static.
- Source: classes/webservice/WebserviceRequest.php line 150.
protected string $_key
Key used for authentication
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 156.
protected \ObjectModel $_object
The current object to support, it extends the PrestaShop ObjectModel
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 125.
protected boolean $_outputEnabled = true
Set if return should display content or not
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 41.
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 89.
public integer $depth
This is used to have a deeper tree diagram.
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 162.
public array $errors = array()
Errors triggered at execution
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 35.
public string $fieldsToDisplay = 'minimum'
The fields to display. These fields will be displayed when retrieving objects
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 138.
public array $keyPermissions
The permissions for the current key
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 107.
public string $method
HTTP Method to support
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 71.
protected \WebserviceOutputBuilder $objOutput
The object to build the output.
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 174.
protected boolean $objectSpecificManagement = false
Set if the management is specific or if it is classic (entity management)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 47.
public array $objects
The list of objects to display
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 119.
protected string $outputFormat = 'xml'
Name of the output format
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 168.
public array $resourceConfiguration
The configuration parameters of the current resource
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 101.
public array $resourceList
The list of each resources manageable via web service
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 95.
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 132.
public mixed $shopIDs
- Visibility: public
- This property is static.
- Source: classes/webservice/WebserviceRequest.php line 183.
protected string $specificOutput = ''
The XML string to display if web service call succeed
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 113.
public array $urlFragments = array()
The segment list of the URL after the "api" segment
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 83.
public array $urlSegment = array()
The segment of the URL
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 77.
public string $wsUrl
Base PrestaShop webservice URL
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 53.
public \ws_current_classname $ws_current_classname
Save the class name for override used in getInstance()
- Visibility: public
- This property is static.
- Source: classes/webservice/WebserviceRequest.php line 180.
boolean WebserviceRequestCore::authenticate()
Check request authentication
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 671
boolean WebserviceRequestCore::checkHTTPMethod()
Check HTTP method
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 803
boolean WebserviceRequestCore::checkResource()
Check resource validity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 821
boolean WebserviceRequestCore::executeEntityDelete()
Execute DELETE method on a PrestaShop entity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1286
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 1244
boolean WebserviceRequestCore::executeEntityPost()
Execute POST method on a PrestaShop entity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1266
boolean WebserviceRequestCore::executeEntityPut()
Execute PUT method on a PrestaShop entity
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1276
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 389
- $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 1580
string WebserviceRequestCore::getClosest(string $input, array $words)
Return the nearest value picked in the values list
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 574
- $input string
- $words array
mixed WebserviceRequestCore::getFilteredObjectDetails()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 1201
mixed WebserviceRequestCore::getFilteredObjectList()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 1181
object WebserviceRequestCore::getInstance()
Get WebserviceRequest object instance (Singleton)
- Visibility: public
- This method is static.
- Source: classes/webservice/WebserviceRequest.php line 203
mixed WebserviceRequestCore::getOutputEnabled()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 186
mixed WebserviceRequestCore::getOutputObject($type)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 210
- $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 299
- $field mixed
- $entity_object mixed
- $ws_params mixed
mixed WebserviceRequestCore::getResources()
- Visibility: public
- This method is static.
- Source: classes/webservice/WebserviceRequest.php line 222
string WebserviceRequestCore::getSQLRetrieveFilter(string $sqlId, string $filterValue, string $tableAlias)
get SQL retrieve Filter
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1537
- $sqlId string
- $filterValue string
- $tableAlias string - = 'main.'
boolean WebserviceRequestCore::hasErrors()
Check if there is one or more error
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 661
boolean WebserviceRequestCore::isActivated()
Check webservice activation
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 731
mixed WebserviceRequestCore::manageFilters()
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 974
mixed WebserviceRequestCore::parseDisplayFields($str)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 882
- $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 1646
boolean WebserviceRequestCore::saveEntityFromXml(integer $successReturnCode)
save Entity Object from XML
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 1355
- $successReturnCode integer
void WebserviceRequestCore::setError(integer $status, string $label, integer $code)
Set a webservice error
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 545
- $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 562
- $num integer
- $label string
- $value array
- $available_values mixed
- $code integer
mixed WebserviceRequestCore::setFieldsToDisplay()
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 922
mixed WebserviceRequestCore::setObjects()
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 844
mixed WebserviceRequestCore::setOutputEnabled($bool)
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 191
- $bool mixed
mixed WebserviceRequestCore::shopExists($params)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 758
- $params mixed
mixed WebserviceRequestCore::shopHasRight($key)
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 741
- $key mixed
mixed WebserviceRequestCore::specificPriceCalculation($parameters)
- Visibility: public
- Source: classes/webservice/WebserviceRequest.php line 327
- $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 361
- $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 317
- $entity_object mixed
- $parameters array
mixed WebserviceRequestCore::webserviceChecks()
- Visibility: protected
- Source: classes/webservice/WebserviceRequest.php line 532
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 604
- $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