Created
September 18, 2013 14:46
-
-
Save blar/6610229 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Modules\Account\Controllers; | |
| use MVC\Controllers\RestController, | |
| Modules\Account\Models\UserModel, | |
| Modules\Account\Models\UserServiceModel, | |
| Blar\Wadl; | |
| class ImportController extends RestController { | |
| public function getTestAction() { | |
| $user = $this->getRepository(UserModel::class)->findOneBy(array( | |
| 'name' => 'Blar' | |
| )); | |
| $service = $this->getRepository(UserServiceModel::class)->findOneBy(array( | |
| 'user_id' => $user->getId(), | |
| 'service' => 'microsoft' | |
| )); | |
| $wadl = new Wadl('../Frameworks/Blar/LiveConnect.wadl'); | |
| $wadl->getClient()->setAuthorization('bearer', $service->getToken()); | |
| return $wadl->getUserProfile(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment