1<?php
2set_include_path(
3    get_include_path()
4    . PATH_SEPARATOR
5    . realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . '..')
6);
7
8require_once 'Services/Soundcloud.php';
9
10/**
11 * Extended class of the Soundcloud class in order to expose protected methods
12 * for testing.
13 *
14 * @category Services
15 * @package Services_Soundcloud
16 * @author Anton Lindqvist <anton@qvister.se>
17 * @copyright 2010 Anton Lindqvist <anton@qvister.se>
18 * @license http://www.opensource.org/licenses/mit-license.php MIT
19 * @link http://github.com/mptre/php-soundcloud
20 */
21class Services_Soundcloud_Expose extends Services_Soundcloud {
22
23    /**
24     * Class constructor. See parent constructor for further reference.
25     *
26     * @param string $clientId Application client id
27     * @param string $clientSecret Application client secret
28     * @param string $redirectUri Application redirect uri
29     * @param boolean $development Sandbox mode
30     *
31     * @return void
32     * @see Soundcloud
33     */
34    function __construct($clientId, $clientSecret, $redirectUri = null, $development = false) {
35        parent::__construct($clientId, $clientSecret, $redirectUri, $development);
36    }
37
38    /**
39     * Construct default http headers including response format and authorization.
40     *
41     * @return array
42     * @see Soundcloud::_buildDefaultHeaders()
43     */
44    function buildDefaultHeaders() {
45        return $this->_buildDefaultHeaders();
46    }
47
48    /**
49     * Construct a url.
50     *
51     * @param string $path Relative or absolute uri
52     * @param array $params Optional query string parameters
53     * @param boolean $includeVersion Include the api version
54     *
55     * @return string
56     * @see Soundcloud::_buildUrl()
57     */
58    function buildUrl($path, $params = null, $includeVersion = true) {
59        return $this->_buildUrl($path, $params, $includeVersion);
60    }
61
62    /**
63     * Get http user agent.
64     *
65     * @return string
66     * @see Soundcloud::_getUserAgent()
67     */
68    function getUserAgent() {
69        return $this->_getUserAgent();
70    }
71
72    /**
73     * Parse HTTP response headers.
74     *
75     * @param string $headers
76     *
77     * @return array
78     * @see Soundcloud::_parseHttpHeaders()
79     */
80    function parseHttpHeaders($headers) {
81        return $this->_parseHttpHeaders($headers);
82    }
83
84    /**
85     * Validates http response code.
86     *
87     * @return boolean
88     * @see Soundcloud::_validResponseCode()
89     */
90    function validResponseCode($code) {
91        return $this->_validResponseCode($code);
92    }
93
94}
95