http://www.imsglobal.org/oneroster-v11-final-csv-tables
The scope of this repository it's to import the file and validate the fields according to v1 standard. The json configuration of fields can be found in /config/v1/ folder
$fileHandler = new FileHandler();
$importService = new ImportService($fileHandler);
$results = $importService->importMultiple(__DIR__ . '/../data/samples/oneRoster1.0/');
$storage = new InMemoryStorage($results);
$fileHandler = new FileHandler();
$importService = new ImportService($fileHandler);
$importService->setPathToFolder(__DIR__ . '/../../data/samples/OneRosterv1p1BaseCSV/');
$storage = new CsvStorage($importService);
1. Setup Entity Repository
$entityRepository = new EntityRepository($storage, $relationConfig);
2. Fetching entities
// get all organisation
$orgs = $entityRepository->getAll(Organisation::class);
// get one organisation
$org = $entityRepository->get('12345', Organisation::class);
$org->getId();
//return id of entity
$org->getData();
//return the data after format (array)
3. Fetching related entities
$oneOrg->getEnrollments();
// return all enrollments assign to organisation.
Circular
$oneOrg === $oneOrg->getClasses()->first()->getOrg();
More information about relations can be found in config/v1/relations.json