Subversion Repositories Applications.papyrus

Rev

Rev 1173 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1173 Rev 1713
Line 17... Line 17...
17
 * @author     Based upon Auth_Container_SOAP by Bruno Pedro <bpedro@co.sapo.pt>
17
 * @author     Based upon Auth_Container_SOAP by Bruno Pedro <bpedro@co.sapo.pt>
18
 * @author     Marcel Oelke <puRe@rednoize.com>
18
 * @author     Marcel Oelke <puRe@rednoize.com>
19
 * @author     Adam Ashley <aashley@php.net>
19
 * @author     Adam Ashley <aashley@php.net>
20
 * @copyright  2001-2006 The PHP Group
20
 * @copyright  2001-2006 The PHP Group
21
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
21
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
22
 * @version    CVS: $Id: SOAP5.php,v 1.1 2006-12-14 15:04:28 jp_milcent Exp $
22
 * @version    CVS: $Id: SOAP5.php,v 1.2 2007-11-19 15:11:00 jp_milcent Exp $
23
 * @since      File available since Release 1.4.0
23
 * @since      File available since Release 1.4.0
24
 */
24
 */
Line 25... Line 25...
25
 
25
 
26
/**
26
/**
Line 99... Line 99...
99
 * @author     Based upon Auth_Container_SOAP by Bruno Pedro <bpedro@co.sapo.pt>
99
 * @author     Based upon Auth_Container_SOAP by Bruno Pedro <bpedro@co.sapo.pt>
100
 * @author     Marcel Oelke <puRe@rednoize.com>
100
 * @author     Marcel Oelke <puRe@rednoize.com>
101
 * @author     Adam Ashley <aashley@php.net>
101
 * @author     Adam Ashley <aashley@php.net>
102
 * @copyright  2001-2006 The PHP Group
102
 * @copyright  2001-2006 The PHP Group
103
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
103
 * @license    http://www.php.net/license/3_01.txt  PHP License 3.01
104
 * @version    Release: 1.4.3  File: $Revision: 1.1 $
104
 * @version    Release: 1.5.4  File: $Revision: 1.2 $
105
 * @since      Class available since Release 1.4.0
105
 * @since      Class available since Release 1.4.0
106
 */
106
 */
107
class Auth_Container_SOAP5 extends Auth_Container
107
class Auth_Container_SOAP5 extends Auth_Container
108
{
108
{
Line 180... Line 180...
180
     * @param  string Password
180
     * @param  string Password
181
     * @return mixed Returns the SOAP response or false if something went wrong
181
     * @return mixed Returns the SOAP response or false if something went wrong
182
     */
182
     */
183
    function fetchData($username, $password)
183
    function fetchData($username, $password)
184
    {        
184
    {
-
 
185
        $this->log('Auth_Container_SOAP5::fetchData() called.', AUTH_LOG_DEBUG);
185
        $result = $this->_validateOptions();
186
        $result = $this->_validateOptions();
186
        if (PEAR::isError($result))
187
        if (PEAR::isError($result))
187
            return $result;
188
            return $result;
Line 188... Line 189...
188
 
189
 
Line 223... Line 224...
223
     * Validate that the options passed to the container class are enough for us to proceed
224
     * Validate that the options passed to the container class are enough for us to proceed
224
     *
225
     *
225
     * @access private
226
     * @access private
226
     * @param  array
227
     * @param  array
227
     */
228
     */
228
    function _validateOptions($array)
229
    function _validateOptions()
229
    {
230
    {
230
        if (   (   is_null($this->options['wsdl'])
231
        if (   (   is_null($this->_options['wsdl'])
231
                && is_null($this->options['location'])
232
                && is_null($this->_options['location'])
232
                && is_null($this->options['uri']))
233
                && is_null($this->_options['uri']))
233
            || (   is_null($this->options['wsdl'])
234
            || (   is_null($this->_options['wsdl'])
234
                && (   is_null($this->options['location'])
235
                && (   is_null($this->_options['location'])
235
                    || is_null($this->options['uri'])))) {
236
                    || is_null($this->_options['uri'])))) {
236
            return PEAR::raiseError('Either a WSDL file or a location/uri pair must be specified.');
237
            return PEAR::raiseError('Either a WSDL file or a location/uri pair must be specified.');
237
        }
238
        }
238
        if (is_null($this->options['method'])) {
239
        if (is_null($this->_options['method'])) {
239
            return PEAR::raiseError('A method to call on the soap service must be specified.');
240
            return PEAR::raiseError('A method to call on the soap service must be specified.');
240
        }
241
        }
241
        return true;
242
        return true;
242
    }
243
    }
Line 250... Line 251...
250
     * @access private
251
     * @access private
251
     * @return void
252
     * @return void
252
     */
253
     */
253
    function _setDefaults()
254
    function _setDefaults()
254
    {
255
    {
255
        $this->options['wsdl']           = null;
256
        $this->_options['wsdl']           = null;
256
        $this->options['location']       = null;
257
        $this->_options['location']       = null;
257
        $this->options['uri']            = null;
258
        $this->_options['uri']            = null;
258
        $this->options['method']         = null;
259
        $this->_options['method']         = null;
259
        $this->options['usernamefield']  = 'username';
260
        $this->_options['usernamefield']  = 'username';
260
        $this->options['passwordfield']  = 'password';
261
        $this->_options['passwordfield']  = 'password';
261
        $this->options['matchpasswords'] = true;
262
        $this->_options['matchpasswords'] = true;
262
    }
263
    }
Line 263... Line 264...
263
 
264
 
Line 264... Line 265...
264
    // }}}
265
    // }}}