Created
August 25, 2017 00:55
-
-
Save makoru-hikage/db6e5f3154b112adc3a3be8b18c4991b to your computer and use it in GitHub Desktop.
What can you infer? This is a function that fetches a certain student record. It's validated and authenticated.
This file contains 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 | |
public function getChecklist($request, $response, $urlParams){ | |
$input = $request->getQueryParams(); | |
$input['student_number'] = $urlParams['student_number']; | |
$output = (new MultipleReadModule ($input)) | |
->setRepository(new CentralRepository) | |
->setModelService('DeltaX\Aegis\ModelServices\GradesRegistry\StudentChecklist') | |
->setUserIdentity('DeltaX\Aegis\ModelServices\UserManagement\StudentIdentity') | |
->setIdentityValue($input['student_number']) | |
->setValidationSet(new ChecklistSearchValidation) | |
->setAuthenticationAdapter($this->app->auth) | |
->run(); | |
return $response->withJson($output['data'], $output['code']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment