Skip to content

Commit a60db58

Browse files
authored
MIG-14682 Rebuilding the new SDK with the latest changes on MIS side (#69)
1 parent e753841 commit a60db58

File tree

10 files changed

+247
-91
lines changed

10 files changed

+247
-91
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?php
2+
namespace Arbor\Model\Cymru;
3+
4+
use Arbor\Resource\Cymru\ResourceType;
5+
use Arbor\Query\Query;
6+
use Arbor\Model\Collection;
7+
use Arbor\Model\Exception;
8+
use Arbor\Model\ModelBase;
9+
10+
class DataReturnCompleter extends ModelBase
11+
{
12+
public const DATA_RETURN = 'dataReturn';
13+
14+
public const HOURS = 'hours';
15+
16+
public const ROLE = 'role';
17+
18+
protected $_resourceType = ResourceType::CYMRU_DATA_RETURN_COMPLETER;
19+
20+
/**
21+
* @param Query $query
22+
* @return DataReturnCompleter[] | Collection
23+
* @throws Exception
24+
*/
25+
public static function query(\Arbor\Query\Query $query = null)
26+
{
27+
$gateway = self::getDefaultGateway();
28+
if ($gateway === null) {
29+
throw new Exception('You must call ModelBase::setDefaultGateway() prior to calling ModelBase::query()');
30+
}
31+
32+
if ($query === null) {
33+
$query = new Query();
34+
}
35+
36+
$query->setResourceType(ResourceType::CYMRU_DATA_RETURN_COMPLETER);
37+
38+
return $gateway->query($query);
39+
}
40+
41+
/**
42+
* @param int $id
43+
* @return DataReturnCompleter
44+
* @throws Exception
45+
*/
46+
public static function retrieve($id)
47+
{
48+
$gateway = self::getDefaultGateway();
49+
if ($gateway === null) {
50+
throw new Exception('You must call ModelBase::setDefaultGateway() prior to calling ModelBase::retrieve()');
51+
}
52+
53+
return $gateway->retrieve(ResourceType::CYMRU_DATA_RETURN_COMPLETER, $id);
54+
}
55+
56+
/**
57+
* @return \Arbor\Model\Statutory\DataReturn
58+
*/
59+
public function getDataReturn()
60+
{
61+
return $this->getProperty('dataReturn');
62+
}
63+
64+
/**
65+
* @param \Arbor\Model\Statutory\DataReturn $dataReturn
66+
*/
67+
public function setDataReturn(\Arbor\Model\Statutory\DataReturn $dataReturn = null)
68+
{
69+
$this->setProperty('dataReturn', $dataReturn);
70+
}
71+
72+
/**
73+
* @return int
74+
*/
75+
public function getHours()
76+
{
77+
return $this->getProperty('hours');
78+
}
79+
80+
/**
81+
* @param int $hours
82+
*/
83+
public function setHours(int $hours = null)
84+
{
85+
$this->setProperty('hours', $hours);
86+
}
87+
88+
/**
89+
* @return string
90+
*/
91+
public function getRole()
92+
{
93+
return $this->getProperty('role');
94+
}
95+
96+
/**
97+
* @param string $role
98+
*/
99+
public function setRole(string $role = null)
100+
{
101+
$this->setProperty('role', $role);
102+
}
103+
}

src/Arbor/Model/Cymru/ProgrammeInstance.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class ProgrammeInstance extends ModelBase
1515

1616
public const PLANNED_LEARNING_HOURS_SECOND_YEAR = 'plannedLearningHoursSecondYear';
1717

18+
public const DEFAULT_LEARNER_ACTIVITY_THROUGH_WELSH_MEDIUM = 'defaultLearnerActivityThroughWelshMedium';
19+
1820
protected $_resourceType = ResourceType::CYMRU_PROGRAMME_INSTANCE;
1921

2022
/**
@@ -100,4 +102,20 @@ public function setPlannedLearningHoursSecondYear(int $plannedLearningHoursSecon
100102
{
101103
$this->setProperty('plannedLearningHoursSecondYear', $plannedLearningHoursSecondYear);
102104
}
105+
106+
/**
107+
* @return string
108+
*/
109+
public function getDefaultLearnerActivityThroughWelshMedium()
110+
{
111+
return $this->getProperty('defaultLearnerActivityThroughWelshMedium');
112+
}
113+
114+
/**
115+
* @param string $defaultLearnerActivityThroughWelshMedium
116+
*/
117+
public function setDefaultLearnerActivityThroughWelshMedium(string $defaultLearnerActivityThroughWelshMedium = null)
118+
{
119+
$this->setProperty('defaultLearnerActivityThroughWelshMedium', $defaultLearnerActivityThroughWelshMedium);
120+
}
103121
}

src/Arbor/Model/Cymru/ServiceChildConcern.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ public function setAssessmentDate(\DateTime $assessmentDate = null)
8080
}
8181

8282
/**
83-
* @return \Arbor\Model\Cymru\CtfImportJobStudent
83+
* @return \Arbor\Model\Statutory\CtfImportJobStudent
8484
*/
8585
public function getCtfImportJobStudent()
8686
{
8787
return $this->getProperty('ctfImportJobStudent');
8888
}
8989

9090
/**
91-
* @param \Arbor\Model\Cymru\CtfImportJobStudent $ctfImportJobStudent
91+
* @param \Arbor\Model\Statutory\CtfImportJobStudent $ctfImportJobStudent
9292
*/
93-
public function setCtfImportJobStudent(\Arbor\Model\Cymru\CtfImportJobStudent $ctfImportJobStudent = null)
93+
public function setCtfImportJobStudent(\Arbor\Model\Statutory\CtfImportJobStudent $ctfImportJobStudent = null)
9494
{
9595
$this->setProperty('ctfImportJobStudent', $ctfImportJobStudent);
9696
}

src/Arbor/Model/Cymru/Student.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ class Student extends ModelBase
1313

1414
public const ETHNICITY_SOURCE = 'ethnicitySource';
1515

16-
public const HOME_LOCAL_AUTHORITY = 'homeLocalAuthority';
17-
1816
public const HOME_WELSH_CODE = 'homeWelshCode';
1917

2018
public const IS_CHILD_PROTECTION_STATUS = 'isChildProtectionStatus';
@@ -39,8 +37,6 @@ class Student extends ModelBase
3937

4038
public const NHS_NUMBER = 'nhsNumber';
4139

42-
public const RESPONSIBLE_LOCAL_AUTHORITY = 'responsibleLocalAuthority';
43-
4440
public const SERVICE_CHILD_IN_EDUCATION = 'serviceChildInEducation';
4541

4642
public const SPEAK_WELSH_CODE = 'speakWelshCode';
@@ -127,22 +123,6 @@ public function setEthnicitySource(string $ethnicitySource = null)
127123
$this->setProperty('ethnicitySource', $ethnicitySource);
128124
}
129125

130-
/**
131-
* @return \Arbor\Model\LocalAuthority
132-
*/
133-
public function getHomeLocalAuthority()
134-
{
135-
return $this->getProperty('homeLocalAuthority');
136-
}
137-
138-
/**
139-
* @param \Arbor\Model\LocalAuthority $homeLocalAuthority
140-
*/
141-
public function setHomeLocalAuthority(\Arbor\Model\LocalAuthority $homeLocalAuthority = null)
142-
{
143-
$this->setProperty('homeLocalAuthority', $homeLocalAuthority);
144-
}
145-
146126
/**
147127
* @return string
148128
*/
@@ -335,22 +315,6 @@ public function setNhsNumber(string $nhsNumber = null)
335315
$this->setProperty('nhsNumber', $nhsNumber);
336316
}
337317

338-
/**
339-
* @return \Arbor\Model\LocalAuthority
340-
*/
341-
public function getResponsibleLocalAuthority()
342-
{
343-
return $this->getProperty('responsibleLocalAuthority');
344-
}
345-
346-
/**
347-
* @param \Arbor\Model\LocalAuthority $responsibleLocalAuthority
348-
*/
349-
public function setResponsibleLocalAuthority(\Arbor\Model\LocalAuthority $responsibleLocalAuthority = null)
350-
{
351-
$this->setProperty('responsibleLocalAuthority', $responsibleLocalAuthority);
352-
}
353-
354318
/**
355319
* @return string
356320
*/

src/Arbor/Model/ExternalAdministrator.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
class ExternalAdministrator extends ModelBase
99
{
10+
public const UNIQUE_EXTERNAL_USER_ID = 'uniqueExternalUserId';
11+
1012
public const FIRST_NAME = 'firstName';
1113

1214
public const LAST_NAME = 'lastName';
@@ -53,6 +55,22 @@ public static function retrieve($id)
5355
return $gateway->retrieve(ResourceType::EXTERNAL_ADMINISTRATOR, $id);
5456
}
5557

58+
/**
59+
* @return string
60+
*/
61+
public function getUniqueExternalUserId()
62+
{
63+
return $this->getProperty('uniqueExternalUserId');
64+
}
65+
66+
/**
67+
* @param string $uniqueExternalUserId
68+
*/
69+
public function setUniqueExternalUserId(string $uniqueExternalUserId = null)
70+
{
71+
$this->setProperty('uniqueExternalUserId', $uniqueExternalUserId);
72+
}
73+
5674
/**
5775
* @return string
5876
*/

src/Arbor/Model/LanguageAbility.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class LanguageAbility extends ModelBase
1111

1212
public const LANGUAGE = 'language';
1313

14+
public const IS_FIRST_LANGUAGE = 'isFirstLanguage';
15+
1416
public const IS_NATIVE_LANGUAGE = 'isNativeLanguage';
1517

1618
public const SPEAKS_LANGUAGE = 'speaksLanguage';
@@ -93,6 +95,22 @@ public function setLanguage(\Arbor\Model\Language $language = null)
9395
$this->setProperty('language', $language);
9496
}
9597

98+
/**
99+
* @return bool
100+
*/
101+
public function getIsFirstLanguage()
102+
{
103+
return $this->getProperty('isFirstLanguage');
104+
}
105+
106+
/**
107+
* @param bool $isFirstLanguage
108+
*/
109+
public function setIsFirstLanguage(bool $isFirstLanguage = null)
110+
{
111+
$this->setProperty('isFirstLanguage', $isFirstLanguage);
112+
}
113+
96114
/**
97115
* @return bool
98116
*/

0 commit comments

Comments
 (0)