File indexing completed on 2025-01-26 05:25:26

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Service
0017  * @subpackage Ebay
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id: Data.php 22791 2010-08-04 16:11:47Z renanbr $
0021  */
0022 
0023 /**
0024  * @see Zend_Service_Ebay_Finding_Abstract
0025  */
0026 // require_once 'Zend/Service/Ebay/Finding/Abstract.php';
0027 
0028 /**
0029  * @category   Zend
0030  * @package    Zend_Service
0031  * @subpackage Ebay
0032  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0033  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0034  * @uses       Zend_Service_Ebay_Finding_Abstract
0035  */
0036 class Zend_Service_Ebay_Finding_Error_Data extends Zend_Service_Ebay_Finding_Abstract
0037 {
0038     /**
0039      * There are three categories of errors: request errors, application errors,
0040      * and system errors.
0041      *
0042      * @var string
0043      */
0044     public $category;
0045 
0046     /**
0047      * Name of the domain in which the error occurred.
0048      *
0049      * Domain values
0050      *
0051      * Marketplace: A business or validation error occurred in the service.
0052      *
0053      * SOA: An exception occurred in the Service Oriented Architecture (SOA)
0054      * framework.
0055      *
0056      * @var string
0057      */
0058     public $domain;
0059 
0060     /**
0061      * A unique code that identifies the particular error condition that
0062      * occurred. Your application can use error codes as identifiers in your
0063      * customized error-handling algorithms.
0064      *
0065      * @var integer
0066      */
0067     public $errorId;
0068 
0069     /**
0070      * Unique identifier for an exception associated with an error.
0071      *
0072      * @var string
0073      */
0074     public $exceptionId;
0075 
0076     /**
0077      * A detailed description of the condition that caused in the error.
0078      *
0079      * @var string
0080      */
0081     public $message;
0082 
0083     /**
0084      * Various warning and error messages return one or more variables that
0085      * contain contextual information about the error. This is often the field
0086      * or value that triggered the error.
0087      *
0088      * @var string[]
0089      */
0090     public $parameter;
0091 
0092     /**
0093      * Indicates whether the reported problem is fatal (an error) or is
0094      * less-severe (a warning). Review the error message details for information
0095      * on the cause.
0096      *
0097      * This API throws an exception when a fatal error occurs. Only warning
0098      * problems can fill this attribute. See more about error parsing at
0099      * {@Zend_Service_Ebay_Finding::_parseResponse()}.
0100      *
0101      * If the request fails and the application is the source of the error (for
0102      * example, a required element is missing), update the application before
0103      * you retry the request. If the problem is due to incorrect user data,
0104      * alert the end-user to the problem and provide the means for them to
0105      * correct the data. Once the problem in the application or data is
0106      * resolved, re-send the request to eBay.
0107      *
0108      * If the source of the problem is on eBay's side, you can retry the request
0109      * a reasonable number of times (eBay recommends you try the request twice).
0110      * If the error persists, contact Developer Technical Support. Once the
0111      * problem has been resolved, you can resend the request in its original
0112      * form.
0113      *
0114      * If a warning occurs, warning information is returned in addition to the
0115      * business data. Normally, you do not need to resend the request (as the
0116      * original request was successful). However, depending on the cause of the
0117      * warning, you might need to contact the end user, or eBay, to effect a
0118      * long term solution to the problem.
0119      *
0120      * @var string
0121      */
0122     public $severity;
0123 
0124     /**
0125      * Name of the subdomain in which the error occurred.
0126      *
0127      * Subdomain values
0128      *
0129      * Finding: The error is specific to the Finding service.
0130      *
0131      * MarketplaceCommon: The error is common to all Marketplace services.
0132      *
0133      * @var string
0134      */
0135     public $subdomain;
0136 
0137     /**
0138      * @return void
0139      */
0140     protected function _init()
0141     {
0142         parent::_init();
0143         $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
0144 
0145         $this->category    = $this->_query(".//$ns:category[1]", 'string');
0146         $this->domain      = $this->_query(".//$ns:domain[1]", 'string');
0147         $this->errorId     = $this->_query(".//$ns:errorId[1]", 'integer');
0148         $this->exceptionId = $this->_query(".//$ns:exceptionId[1]", 'string');
0149         $this->message     = $this->_query(".//$ns:message[1]", 'string');
0150         $this->parameter   = $this->_query(".//$ns:parameter", 'string', true);
0151         $this->severity    = $this->_query(".//$ns:severity[1]", 'string');
0152         $this->subdomain   = $this->_query(".//$ns:subdomain[1]", 'string');
0153 
0154         $this->_attributes['parameter'] = array(
0155             'name' => $this->_query(".//$ns:parameter/@name", 'string', true)
0156         );
0157     }
0158 }