|
21 | 21 | use Scriptotek\Alma\Bibs\Bibs;
|
22 | 22 | use Scriptotek\Alma\Bibs\Items;
|
23 | 23 | use Scriptotek\Alma\Conf\Conf;
|
| 24 | +use Scriptotek\Alma\Conf\Jobs; |
| 25 | +use Scriptotek\Alma\Conf\Libraries; |
24 | 26 | use Scriptotek\Alma\Conf\Library;
|
25 | 27 | use Scriptotek\Alma\Exception\ClientException as AlmaClientException;
|
26 | 28 | use Scriptotek\Alma\Exception\InvalidApiKey;
|
@@ -86,15 +88,35 @@ class Client
|
86 | 88 | /** @var float Number of seconds to sleep before retrying after a server error */
|
87 | 89 | public $sleepTimeOnServerError = 10;
|
88 | 90 |
|
| 91 | + /** |
| 92 | + * @var Conf |
| 93 | + */ |
| 94 | + public $conf; |
| 95 | + |
| 96 | + /** |
| 97 | + * @var Libraries |
| 98 | + */ |
| 99 | + public $libraries; |
| 100 | + |
| 101 | + /** |
| 102 | + * @var Jobs |
| 103 | + */ |
| 104 | + public $jobs; |
| 105 | + |
| 106 | + /** |
| 107 | + * @var TaskLists |
| 108 | + */ |
| 109 | + public $taskLists; |
| 110 | + |
89 | 111 | /**
|
90 | 112 | * Create a new client to connect to a given Alma instance.
|
91 | 113 | *
|
92 |
| - * @param string $key API key |
93 |
| - * @param string $region Hosted region code, used to build base URL |
94 |
| - * @param string $zone Alma zone (Either Zones::INSTITUTION or Zones::NETWORK) |
95 |
| - * @param HttpClientInterface $http |
96 |
| - * @param RequestFactoryInterface $requestFactory |
97 |
| - * @param UriFactoryInterface $uriFactory |
| 114 | + * @param ?string $key API key |
| 115 | + * @param string $region Hosted region code, used to build base URL |
| 116 | + * @param string $zone Alma zone (Either Zones::INSTITUTION or Zones::NETWORK) |
| 117 | + * @param ?HttpClientInterface $http |
| 118 | + * @param ?RequestFactoryInterface $requestFactory |
| 119 | + * @param ?UriFactoryInterface $uriFactory |
98 | 120 | *
|
99 | 121 | * @throws \ErrorException
|
100 | 122 | */
|
@@ -129,6 +151,7 @@ public function __construct(
|
129 | 151 |
|
130 | 152 | $this->conf = new Conf($this);
|
131 | 153 | $this->libraries = $this->conf->libraries; // shortcut
|
| 154 | + $this->jobs = $this->conf->jobs; // shortcut |
132 | 155 |
|
133 | 156 | $this->taskLists = new TaskLists($this);
|
134 | 157 |
|
|
0 commit comments