1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- /**
- * ApiClient
- *
- * PHP version 5
- *
- * @category Services
- * @package Authy
- * @author David Cuadrado <[email protected]>
- * @license http://creativecommons.org/licenses/MIT/ MIT
- * @link http://authy.github.com/pear
- */
- /**
- * User implementation. Extends from Authy_Response
- *
- * @category Services
- * @package Authy
- * @author David Cuadrado <[email protected]>
- * @license http://creativecommons.org/licenses/MIT/ MIT
- * @link http://authy.github.com/pear
- */
- class Authy_User extends \Authy_Response
- {
- /**
- * Constructor.
- *
- * @param array $raw_response Raw server response
- */
- public function __construct($raw_response)
- {
- if (isset($raw_response['body']->user)) {
- // response is {user: {id: id}}
- $raw_response['body'] = $raw_response['body']->user;
- }
- parent::__construct($raw_response);
- }
- }
|