File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Scriptotek \Alma \Conf ;
4
+
5
+ use Scriptotek \Alma \Client ;
6
+ use Scriptotek \Alma \Model \PaginatedListGenerator ;
7
+ use Scriptotek \Alma \Model \SimplePaginatedList ;
8
+ use Scriptotek \Alma \Model \ReadOnlyArrayAccess ;
9
+ use Scriptotek \Alma \Conf \Library ;
10
+
11
+ class CodeTables
12
+ {
13
+ use ReadOnlyArrayAccess;
14
+
15
+ /* @var Client */
16
+ protected $ client ;
17
+
18
+ public function __construct (Client $ client )
19
+ {
20
+ $ this ->client = $ client ;
21
+ }
22
+
23
+ /**
24
+ * Return an object containing the code table content.
25
+ *
26
+ * @return CodeTable object.
27
+ */
28
+ public function getCodeTable ($ codetable )
29
+ {
30
+ return json_decode ($ this ->client ->get ($ this ->urlBase ()."/ $ codetable " ));
31
+ }
32
+
33
+ /**
34
+ * Return a object containing a list of code tables.
35
+ *
36
+ * @return CodeTable ojbect list.
37
+ */
38
+ public function getCodeTables ()
39
+ {
40
+ return json_decode ($ this ->client ->get ($ this ->urlBase ()));
41
+ }
42
+
43
+ /**
44
+ * Generate the base URL for this resource.
45
+ *
46
+ * @return string
47
+ */
48
+ protected function urlBase ()
49
+ {
50
+ return '/conf/code-tables ' ;
51
+ }
52
+ }
53
+
You can’t perform that action at this time.
0 commit comments