PageRenderTime 37ms CodeModel.GetById 29ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/plugin/PBAPI/PBAPI/Exception/Response.php

https://bitbucket.org/chamilo/chamilo-ext-repo-photobucket-dev/
PHP | 39 lines | 14 code | 2 blank | 23 comment | 0 complexity | 3e238b6a599a8e09846a7070ced7cc47 MD5 | raw file
 1<?php
 2/**
 3 * Photobucket API 
 4 * Fluent interface for PHP5
 5 * Response exception
 6 * 
 7 * @author Photobucket
 8 * @package PBAPI
 9 * @subpackage Exception
10 * 
11 * @copyright Copyright (c) 2008, Photobucket, Inc.
12 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
13 */
14
15/**
16 * Response exceptions for the PBAPI
17 *
18 * @package PBAPI
19 * @subpackage Exception
20 */
21class PBAPI_Exception_Response extends PBAPI_Exception
22{
23
24    /**
25     * Response magic tostring
26     *
27     * @return string
28     */
29    public function __toString()
30    {
31        $str = __CLASS__ . ' (' . $this->getCode() . '): "' . $this->getMessage() . "\"\n" . 'Method: ' . implode(':', $this->getMethodStack()) . "\n" . 'Params: ';
32        foreach ($this->getParams() as $k => $v)
33        {
34            $str .= "$k => $v, ";
35        }
36        return $str;
37    }
38
39}