Source for file Error.php
Documentation is available at Error.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* Payment_PayPal_SOAP is a package to easily use PayPal's SOAP API from PHP
* This file contains an error object
* Copyright (c) 2012 silverorange
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* @package Payment_PayPal_SOAP
* @author Michael Gauthier <mike@silverorange.com>
* @copyright 2012 silverorange
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @link http://pear.php.net/package/Payment_PayPal_SOAP
* Error raised by the PayPal SOAP API
* Errors are aggregated by the {@link Payment_PayPal_SOAP_ErrorException}
* @package Payment_PayPal_SOAP
* @author Michael Gauthier <mike@silverorange.com>
* @copyright 2012 silverorange
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @link http://pear.php.net/package/Payment_PayPal_SOAP
* @see Payment_PayPal_SOAP_ErrorException
* Error type for expired PayPal Express Checkout tokens
const TYPE_EXPIRED_TOKEN = 1;
// {{{ protected properties
* @see Payment_PayPal_SOAP_Error::getMessage()
* @see Payment_PayPal_SOAP_Error::setMessage()
* Error code as specified in the PayPal API error codes
* @see Payment_PayPal_SOAP_Error::getCode()
* @see Payment_PayPal_SOAP_Error::setCode()
* - {@link Payment_PayPal_SOAP::ERROR_WARNING},
* - {@link Payment_PayPal_SOAP::ERROR_ERROR}, or
* - {@link Payment_PayPal_SOAP::ERROR_UNKNOWN}
* @see Payment_PayPal_SOAP_Error::getSeverity()
* @see Payment_PayPal_SOAP_Error::setSeverity()
protected $severity = Payment_PayPal_SOAP ::ERROR_UNKNOWN;
* - {@link Payment_PayPal_SOAP_Error::TYPE_DEFAULT}, or
* - {@link Payment_PayPal_SOAP_Error::TYPE_EXPIRED_TOKEN}
* @see Payment_PayPal_SOAP_Error::getType()
* @see Payment_PayPal_SOAP_Error::setType()
protected $type = Payment_PayPal_SOAP_Error ::TYPE_DEFAULT;
* Creates a new error object
* @param string $message the message of this error.
* @param integer $code the code of this error.
* @param integer $severity the severity of this error.
* @param integer $type the type of this error.
public function __construct($message, $code, $severity, $type)
* Sets the message of this error
* @param string $message the message of this error.
* @return Payment_PayPal_SOAP_Error this object, for fluent interface.
* Sets the code of this error
* Should be a valid API error code as specified in the PayPal SOAP API.
* @param integer $code the code of this error.
* @return Payment_PayPal_SOAP_Error this object, for fluent interface.
$this->code = (integer) $code;
* Sets the severity of this error
* - {@link Payment_PayPal_SOAP::ERROR_WARNING},
* - {@link Payment_PayPal_SOAP::ERROR_ERROR}, or
* - {@link Payment_PayPal_SOAP::ERROR_UNKNOWN}
* @param integer $severity the severity of this error.
* @return Payment_PayPal_SOAP_Error this object, for fluent interface.
* Sets the type of this error
* - {@link Payment_PayPal_SOAP_Error::TYPE_DEFAULT}, or
* - {@link Payment_PayPal_SOAP_Error::TYPE_EXPIRED_TOKEN}
* @param integer $type the type of this error.
* @return Payment_PayPal_SOAP_Error this object, for fluent interface.
$this->type = (integer) $type;
* Gets the message of this error
* @return string the message of this error.
* Gets the code of this error
* @return integer the code of this error.
* Gets the severity of this error
* @return integer the severity of this error.
* Gets the type of this error
* @return integer the type of this error.
Documentation generated on Tue, 25 Sep 2012 14:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.
|