@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | class Manager |
| 26 | 26 | { |
| 27 | - const SOLR_DATE_FORMAT = 'Y-m-d\TH:i:s\Z'; |
|
| 27 | + const SOLR_DATE_FORMAT = 'Y-m-d\TH:i:s\Z'; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @var ModuleOptions |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param string $path |
| 47 | 47 | * @return \SolrClient |
| 48 | 48 | */ |
| 49 | - public function getClient($path='/solr') |
|
| 49 | + public function getClient($path = '/solr') |
|
| 50 | 50 | { |
| 51 | 51 | $options = $this->options; |
| 52 | 52 | $options = [ |
@@ -69,15 +69,15 @@ discard block |
||
| 69 | 69 | * @param string $path |
| 70 | 70 | * @throws ServerException When failed adding document to server |
| 71 | 71 | */ |
| 72 | - public function addDocument(\SolrInputDocument $document,$path='/solr') |
|
| 72 | + public function addDocument(\SolrInputDocument $document, $path = '/solr') |
|
| 73 | 73 | { |
| 74 | 74 | $client = $this->getClient($path); |
| 75 | - try{ |
|
| 75 | + try { |
|
| 76 | 76 | $client->addDocument($document); |
| 77 | 77 | $client->commit(); |
| 78 | 78 | $client->optimize(); |
| 79 | - }catch (\Exception $e){ |
|
| 80 | - throw new ServerException('Can not add document to server!',$e->getCode(),$e); |
|
| 79 | + } catch (\Exception $e) { |
|
| 80 | + throw new ServerException('Can not add document to server!', $e->getCode(), $e); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * @param ResultConverter $resultConverter |
| 72 | 72 | * @param array $params |
| 73 | 73 | */ |
| 74 | - public function __construct($client,$filter,$resultConverter,$params=array()) |
|
| 74 | + public function __construct($client, $filter, $resultConverter, $params = array()) |
|
| 75 | 75 | { |
| 76 | 76 | $this->client = $client; |
| 77 | 77 | $this->filter = $filter; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | return $this->resultConverter->convert( |
| 88 | 88 | $this->filter, |
| 89 | - $this->getResponse($offset,$itemCountPerPage)->getResponse() |
|
| 89 | + $this->getResponse($offset, $itemCountPerPage)->getResponse() |
|
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -109,20 +109,20 @@ discard block |
||
| 109 | 109 | * @return \SolrQueryResponse |
| 110 | 110 | * @throws ServerException |
| 111 | 111 | */ |
| 112 | - protected function getResponse($offset=0,$itemCountPerPage=0) |
|
| 112 | + protected function getResponse($offset = 0, $itemCountPerPage = 0) |
|
| 113 | 113 | { |
| 114 | 114 | $id = md5($offset.$itemCountPerPage); |
| 115 | - if(!isset($this->responses[$id])){ |
|
| 115 | + if (!isset($this->responses[$id])) { |
|
| 116 | 116 | $query = new \SolrDisMaxQuery(); |
| 117 | 117 | $query->useEDisMaxQueryParser(); |
| 118 | - $query = $this->filter->filter($this->params,$query); |
|
| 118 | + $query = $this->filter->filter($this->params, $query); |
|
| 119 | 119 | $query->setStart($offset); |
| 120 | 120 | $query->setRows($itemCountPerPage); |
| 121 | - try{ |
|
| 121 | + try { |
|
| 122 | 122 | $this->responses[$id] = $this->client->query($query); |
| 123 | - }catch (\Exception $e){ |
|
| 123 | + } catch (\Exception $e) { |
|
| 124 | 124 | $message = 'Failed to process query'; |
| 125 | - throw new ServerException($message,$e->getCode(),$e); |
|
| 125 | + throw new ServerException($message, $e->getCode(), $e); |
|
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
@@ -46,409 +46,409 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | - * @see \Jobs\Entity\JobInterface::getApplications() |
|
| 50 | - */ |
|
| 51 | - public function getApplications() |
|
| 52 | - { |
|
| 53 | - return $this->job->getApplications(); |
|
| 54 | - } |
|
| 55 | - |
|
| 56 | - /** |
|
| 57 | - * @see \Jobs\Entity\JobInterface::getApplyId() |
|
| 58 | - */ |
|
| 59 | - public function getApplyId() |
|
| 60 | - { |
|
| 61 | - return $this->getSolrResultValue('applyId') ?: $this->job->getApplyId(); |
|
| 62 | - } |
|
| 63 | - |
|
| 64 | - /** |
|
| 65 | - * @see \Jobs\Entity\JobInterface::getAtsEnabled() |
|
| 66 | - */ |
|
| 67 | - public function getAtsEnabled() |
|
| 68 | - { |
|
| 69 | - return $this->job->getAtsEnabled(); |
|
| 70 | - } |
|
| 71 | - |
|
| 72 | - /** |
|
| 73 | - * @see \Jobs\Entity\JobInterface::getAtsMode() |
|
| 74 | - */ |
|
| 75 | - public function getAtsMode() |
|
| 76 | - { |
|
| 49 | + * @see \Jobs\Entity\JobInterface::getApplications() |
|
| 50 | + */ |
|
| 51 | + public function getApplications() |
|
| 52 | + { |
|
| 53 | + return $this->job->getApplications(); |
|
| 54 | + } |
|
| 55 | + |
|
| 56 | + /** |
|
| 57 | + * @see \Jobs\Entity\JobInterface::getApplyId() |
|
| 58 | + */ |
|
| 59 | + public function getApplyId() |
|
| 60 | + { |
|
| 61 | + return $this->getSolrResultValue('applyId') ?: $this->job->getApplyId(); |
|
| 62 | + } |
|
| 63 | + |
|
| 64 | + /** |
|
| 65 | + * @see \Jobs\Entity\JobInterface::getAtsEnabled() |
|
| 66 | + */ |
|
| 67 | + public function getAtsEnabled() |
|
| 68 | + { |
|
| 69 | + return $this->job->getAtsEnabled(); |
|
| 70 | + } |
|
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * @see \Jobs\Entity\JobInterface::getAtsMode() |
|
| 74 | + */ |
|
| 75 | + public function getAtsMode() |
|
| 76 | + { |
|
| 77 | 77 | return $this->job->getAtsMode(); |
| 78 | - } |
|
| 78 | + } |
|
| 79 | 79 | |
| 80 | 80 | /** |
| 81 | - * @see \Jobs\Entity\JobInterface::getCompany() |
|
| 82 | - */ |
|
| 83 | - public function getCompany() |
|
| 84 | - { |
|
| 85 | - return $this->job->getCompany(); |
|
| 86 | - } |
|
| 81 | + * @see \Jobs\Entity\JobInterface::getCompany() |
|
| 82 | + */ |
|
| 83 | + public function getCompany() |
|
| 84 | + { |
|
| 85 | + return $this->job->getCompany(); |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | - * @see \Jobs\Entity\JobInterface::getContactEmail() |
|
| 90 | - */ |
|
| 91 | - public function getContactEmail() |
|
| 92 | - { |
|
| 93 | - return $this->getSolrResultValue('applicationEmail') ?: $this->job->getContactEmail(); |
|
| 94 | - } |
|
| 89 | + * @see \Jobs\Entity\JobInterface::getContactEmail() |
|
| 90 | + */ |
|
| 91 | + public function getContactEmail() |
|
| 92 | + { |
|
| 93 | + return $this->getSolrResultValue('applicationEmail') ?: $this->job->getContactEmail(); |
|
| 94 | + } |
|
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * @see \Jobs\Entity\JobInterface::getDatePublishEnd() |
|
| 98 | - */ |
|
| 99 | - public function getDatePublishEnd() |
|
| 100 | - { |
|
| 101 | - $date = $this->getSolrResultValue('datePublishEnd'); |
|
| 97 | + * @see \Jobs\Entity\JobInterface::getDatePublishEnd() |
|
| 98 | + */ |
|
| 99 | + public function getDatePublishEnd() |
|
| 100 | + { |
|
| 101 | + $date = $this->getSolrResultValue('datePublishEnd'); |
|
| 102 | 102 | |
| 103 | 103 | return $date ? Util::convertSolrDateToPhpDateTime($date) : $this->job->getDatePublishEnd(); |
| 104 | - } |
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | - * @see \Jobs\Entity\JobInterface::getDatePublishStart() |
|
| 108 | - */ |
|
| 109 | - public function getDatePublishStart() |
|
| 110 | - { |
|
| 111 | - $date = $this->getSolrResultValue('datePublishStart'); |
|
| 107 | + * @see \Jobs\Entity\JobInterface::getDatePublishStart() |
|
| 108 | + */ |
|
| 109 | + public function getDatePublishStart() |
|
| 110 | + { |
|
| 111 | + $date = $this->getSolrResultValue('datePublishStart'); |
|
| 112 | 112 | |
| 113 | 113 | return $date ? Util::convertSolrDateToPhpDateTime($date) : $this->job->getDatePublishStart(); |
| 114 | - } |
|
| 114 | + } |
|
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | - * @see \Jobs\Entity\JobInterface::getHistory() |
|
| 118 | - */ |
|
| 119 | - public function getHistory() |
|
| 120 | - { |
|
| 121 | - return $this->job->getHistory(); |
|
| 117 | + * @see \Jobs\Entity\JobInterface::getHistory() |
|
| 118 | + */ |
|
| 119 | + public function getHistory() |
|
| 120 | + { |
|
| 121 | + return $this->job->getHistory(); |
|
| 122 | 122 | |
| 123 | - } |
|
| 123 | + } |
|
| 124 | 124 | |
| 125 | 125 | /** |
| 126 | - * @see \Jobs\Entity\JobInterface::getLanguage() |
|
| 127 | - */ |
|
| 128 | - public function getLanguage() |
|
| 129 | - { |
|
| 130 | - return $this->getSolrResultValue('lang') ?: $this->job->getLanguage(); |
|
| 131 | - } |
|
| 126 | + * @see \Jobs\Entity\JobInterface::getLanguage() |
|
| 127 | + */ |
|
| 128 | + public function getLanguage() |
|
| 129 | + { |
|
| 130 | + return $this->getSolrResultValue('lang') ?: $this->job->getLanguage(); |
|
| 131 | + } |
|
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | - * @see \Jobs\Entity\JobInterface::getLink() |
|
| 135 | - */ |
|
| 136 | - public function getLink() |
|
| 137 | - { |
|
| 138 | - return $this->getSolrResultValue('link') ?: $this->job->getLink(); |
|
| 139 | - } |
|
| 134 | + * @see \Jobs\Entity\JobInterface::getLink() |
|
| 135 | + */ |
|
| 136 | + public function getLink() |
|
| 137 | + { |
|
| 138 | + return $this->getSolrResultValue('link') ?: $this->job->getLink(); |
|
| 139 | + } |
|
| 140 | 140 | |
| 141 | 141 | /** |
| 142 | - * @see \Jobs\Entity\JobInterface::getLocation() |
|
| 143 | - */ |
|
| 144 | - public function getLocation() |
|
| 145 | - { |
|
| 146 | - // check for a locations subquery result |
|
| 147 | - if (isset($this->solrResult['locations']) |
|
| 148 | - && $this->solrResult['locations'] instanceof ArrayAccess |
|
| 149 | - && isset($this->solrResult['locations']['docs']) |
|
| 142 | + * @see \Jobs\Entity\JobInterface::getLocation() |
|
| 143 | + */ |
|
| 144 | + public function getLocation() |
|
| 145 | + { |
|
| 146 | + // check for a locations subquery result |
|
| 147 | + if (isset($this->solrResult['locations']) |
|
| 148 | + && $this->solrResult['locations'] instanceof ArrayAccess |
|
| 149 | + && isset($this->solrResult['locations']['docs']) |
|
| 150 | 150 | ) |
| 151 | - { |
|
| 152 | - // get concatenated list of cities from the locations |
|
| 153 | - $locations = trim(implode(', ', array_unique(array_map(function (ArrayAccess $doc) |
|
| 154 | - { |
|
| 155 | - return isset($doc->city) ? trim($doc->city) : ''; |
|
| 156 | - }, $this->solrResult['locations']['docs'])))); |
|
| 151 | + { |
|
| 152 | + // get concatenated list of cities from the locations |
|
| 153 | + $locations = trim(implode(', ', array_unique(array_map(function (ArrayAccess $doc) |
|
| 154 | + { |
|
| 155 | + return isset($doc->city) ? trim($doc->city) : ''; |
|
| 156 | + }, $this->solrResult['locations']['docs'])))); |
|
| 157 | 157 | |
| 158 | - if ($locations) { |
|
| 158 | + if ($locations) { |
|
| 159 | 159 | return $locations; |
| 160 | 160 | } |
| 161 | - } |
|
| 161 | + } |
|
| 162 | 162 | |
| 163 | - return $this->getSolrResultValue('location') ?: $this->job->getLocation(); |
|
| 164 | - } |
|
| 163 | + return $this->getSolrResultValue('location') ?: $this->job->getLocation(); |
|
| 164 | + } |
|
| 165 | 165 | |
| 166 | 166 | /** |
| 167 | - * @see \Jobs\Entity\JobInterface::getLocations() |
|
| 168 | - */ |
|
| 169 | - public function getLocations() |
|
| 170 | - { |
|
| 171 | - return $this->job->getLocations(); |
|
| 172 | - } |
|
| 167 | + * @see \Jobs\Entity\JobInterface::getLocations() |
|
| 168 | + */ |
|
| 169 | + public function getLocations() |
|
| 170 | + { |
|
| 171 | + return $this->job->getLocations(); |
|
| 172 | + } |
|
| 173 | 173 | |
| 174 | 174 | /** |
| 175 | - * @see \Jobs\Entity\JobInterface::getOrganization() |
|
| 176 | - */ |
|
| 177 | - public function getOrganization() |
|
| 178 | - { |
|
| 179 | - return $this->job->getOrganization(); |
|
| 180 | - } |
|
| 175 | + * @see \Jobs\Entity\JobInterface::getOrganization() |
|
| 176 | + */ |
|
| 177 | + public function getOrganization() |
|
| 178 | + { |
|
| 179 | + return $this->job->getOrganization(); |
|
| 180 | + } |
|
| 181 | 181 | |
| 182 | 182 | /** |
| 183 | - * @see \Jobs\Entity\JobInterface::getPortals() |
|
| 184 | - */ |
|
| 185 | - public function getPortals() |
|
| 186 | - { |
|
| 187 | - return $this->job->getPortals(); |
|
| 188 | - } |
|
| 183 | + * @see \Jobs\Entity\JobInterface::getPortals() |
|
| 184 | + */ |
|
| 185 | + public function getPortals() |
|
| 186 | + { |
|
| 187 | + return $this->job->getPortals(); |
|
| 188 | + } |
|
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * @see \Jobs\Entity\JobInterface::getReference() |
|
| 192 | - */ |
|
| 193 | - public function getReference() |
|
| 194 | - { |
|
| 195 | - return $this->job->getReference(); |
|
| 196 | - } |
|
| 191 | + * @see \Jobs\Entity\JobInterface::getReference() |
|
| 192 | + */ |
|
| 193 | + public function getReference() |
|
| 194 | + { |
|
| 195 | + return $this->job->getReference(); |
|
| 196 | + } |
|
| 197 | 197 | |
| 198 | 198 | /** |
| 199 | - * @see \Jobs\Entity\JobInterface::getStatus() |
|
| 200 | - */ |
|
| 201 | - public function getStatus() |
|
| 202 | - { |
|
| 203 | - return $this->job->getStatus(); |
|
| 204 | - } |
|
| 199 | + * @see \Jobs\Entity\JobInterface::getStatus() |
|
| 200 | + */ |
|
| 201 | + public function getStatus() |
|
| 202 | + { |
|
| 203 | + return $this->job->getStatus(); |
|
| 204 | + } |
|
| 205 | 205 | |
| 206 | 206 | /** |
| 207 | - * @see \Jobs\Entity\JobInterface::getTermsAccepted() |
|
| 208 | - */ |
|
| 209 | - public function getTermsAccepted() |
|
| 210 | - { |
|
| 211 | - return $this->job->getTermsAccepted(); |
|
| 212 | - } |
|
| 207 | + * @see \Jobs\Entity\JobInterface::getTermsAccepted() |
|
| 208 | + */ |
|
| 209 | + public function getTermsAccepted() |
|
| 210 | + { |
|
| 211 | + return $this->job->getTermsAccepted(); |
|
| 212 | + } |
|
| 213 | 213 | |
| 214 | 214 | /** |
| 215 | - * @see \Jobs\Entity\JobInterface::getTitle() |
|
| 216 | - */ |
|
| 217 | - public function getTitle() |
|
| 218 | - { |
|
| 219 | - return $this->getSolrResultValue('title') ?: $this->job->getTitle(); |
|
| 220 | - } |
|
| 215 | + * @see \Jobs\Entity\JobInterface::getTitle() |
|
| 216 | + */ |
|
| 217 | + public function getTitle() |
|
| 218 | + { |
|
| 219 | + return $this->getSolrResultValue('title') ?: $this->job->getTitle(); |
|
| 220 | + } |
|
| 221 | 221 | |
| 222 | 222 | /** |
| 223 | - * @see \Jobs\Entity\JobInterface::getUriApply() |
|
| 224 | - */ |
|
| 225 | - public function getUriApply() |
|
| 226 | - { |
|
| 227 | - return $this->job->getUriApply(); |
|
| 228 | - } |
|
| 223 | + * @see \Jobs\Entity\JobInterface::getUriApply() |
|
| 224 | + */ |
|
| 225 | + public function getUriApply() |
|
| 226 | + { |
|
| 227 | + return $this->job->getUriApply(); |
|
| 228 | + } |
|
| 229 | 229 | |
| 230 | 230 | /** |
| 231 | - * @see \Jobs\Entity\JobInterface::getUriPublisher() |
|
| 232 | - */ |
|
| 233 | - public function getUriPublisher() |
|
| 234 | - { |
|
| 235 | - return $this->job->getUriPublisher(); |
|
| 236 | - } |
|
| 231 | + * @see \Jobs\Entity\JobInterface::getUriPublisher() |
|
| 232 | + */ |
|
| 233 | + public function getUriPublisher() |
|
| 234 | + { |
|
| 235 | + return $this->job->getUriPublisher(); |
|
| 236 | + } |
|
| 237 | 237 | |
| 238 | 238 | /** |
| 239 | - * @see \Jobs\Entity\JobInterface::getUser() |
|
| 240 | - */ |
|
| 241 | - public function getUser() |
|
| 242 | - { |
|
| 243 | - return $this->job->getUser(); |
|
| 244 | - } |
|
| 239 | + * @see \Jobs\Entity\JobInterface::getUser() |
|
| 240 | + */ |
|
| 241 | + public function getUser() |
|
| 242 | + { |
|
| 243 | + return $this->job->getUser(); |
|
| 244 | + } |
|
| 245 | 245 | |
| 246 | 246 | /** |
| 247 | - * @see \Jobs\Entity\JobInterface::setApplications() |
|
| 248 | - */ |
|
| 249 | - public function setApplications(\Doctrine\Common\Collections\Collection $applications) |
|
| 250 | - { |
|
| 251 | - return $this->job->setApplications($applications); |
|
| 252 | - } |
|
| 247 | + * @see \Jobs\Entity\JobInterface::setApplications() |
|
| 248 | + */ |
|
| 249 | + public function setApplications(\Doctrine\Common\Collections\Collection $applications) |
|
| 250 | + { |
|
| 251 | + return $this->job->setApplications($applications); |
|
| 252 | + } |
|
| 253 | 253 | |
| 254 | 254 | /** |
| 255 | - * @see \Jobs\Entity\JobInterface::setApplyId() |
|
| 256 | - */ |
|
| 257 | - public function setApplyId($applyId) |
|
| 258 | - { |
|
| 259 | - return $this->job->setApplyId($applyId); |
|
| 260 | - } |
|
| 255 | + * @see \Jobs\Entity\JobInterface::setApplyId() |
|
| 256 | + */ |
|
| 257 | + public function setApplyId($applyId) |
|
| 258 | + { |
|
| 259 | + return $this->job->setApplyId($applyId); |
|
| 260 | + } |
|
| 261 | 261 | |
| 262 | 262 | /** |
| 263 | - * @see \Jobs\Entity\JobInterface::setAtsEnabled() |
|
| 264 | - */ |
|
| 265 | - public function setAtsEnabled($atsEnabled) |
|
| 266 | - { |
|
| 267 | - return $this->job->setAtsEnabled($atsEnabled); |
|
| 268 | - } |
|
| 263 | + * @see \Jobs\Entity\JobInterface::setAtsEnabled() |
|
| 264 | + */ |
|
| 265 | + public function setAtsEnabled($atsEnabled) |
|
| 266 | + { |
|
| 267 | + return $this->job->setAtsEnabled($atsEnabled); |
|
| 268 | + } |
|
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | - * @see \Jobs\Entity\JobInterface::setAtsMode() |
|
| 272 | - */ |
|
| 273 | - public function setAtsMode(\Jobs\Entity\AtsMode $mode) |
|
| 274 | - { |
|
| 275 | - return $this->job->setAtsMode($mode); |
|
| 276 | - } |
|
| 271 | + * @see \Jobs\Entity\JobInterface::setAtsMode() |
|
| 272 | + */ |
|
| 273 | + public function setAtsMode(\Jobs\Entity\AtsMode $mode) |
|
| 274 | + { |
|
| 275 | + return $this->job->setAtsMode($mode); |
|
| 276 | + } |
|
| 277 | 277 | |
| 278 | 278 | /** |
| 279 | - * @see \Jobs\Entity\JobInterface::setCompany() |
|
| 280 | - */ |
|
| 281 | - public function setCompany($company) |
|
| 282 | - { |
|
| 283 | - return $this->job->setCompany($company); |
|
| 284 | - } |
|
| 279 | + * @see \Jobs\Entity\JobInterface::setCompany() |
|
| 280 | + */ |
|
| 281 | + public function setCompany($company) |
|
| 282 | + { |
|
| 283 | + return $this->job->setCompany($company); |
|
| 284 | + } |
|
| 285 | 285 | |
| 286 | 286 | /** |
| 287 | - * @see \Jobs\Entity\JobInterface::setContactEmail() |
|
| 288 | - */ |
|
| 289 | - public function setContactEmail($email) |
|
| 290 | - { |
|
| 291 | - return $this->job->setContactEmail($email); |
|
| 292 | - } |
|
| 287 | + * @see \Jobs\Entity\JobInterface::setContactEmail() |
|
| 288 | + */ |
|
| 289 | + public function setContactEmail($email) |
|
| 290 | + { |
|
| 291 | + return $this->job->setContactEmail($email); |
|
| 292 | + } |
|
| 293 | 293 | |
| 294 | 294 | /** |
| 295 | - * @see \Jobs\Entity\JobInterface::setDatePublishEnd() |
|
| 296 | - */ |
|
| 297 | - public function setDatePublishEnd($datePublishEnd) |
|
| 298 | - { |
|
| 299 | - return $this->job->setDatePublishEnd($datePublishEnd); |
|
| 300 | - } |
|
| 295 | + * @see \Jobs\Entity\JobInterface::setDatePublishEnd() |
|
| 296 | + */ |
|
| 297 | + public function setDatePublishEnd($datePublishEnd) |
|
| 298 | + { |
|
| 299 | + return $this->job->setDatePublishEnd($datePublishEnd); |
|
| 300 | + } |
|
| 301 | 301 | |
| 302 | 302 | /** |
| 303 | - * @see \Jobs\Entity\JobInterface::setDatePublishStart() |
|
| 304 | - */ |
|
| 305 | - public function setDatePublishStart($datePublishStart) |
|
| 306 | - { |
|
| 307 | - return $this->job->setDatePublishStart($datePublishStart); |
|
| 308 | - } |
|
| 303 | + * @see \Jobs\Entity\JobInterface::setDatePublishStart() |
|
| 304 | + */ |
|
| 305 | + public function setDatePublishStart($datePublishStart) |
|
| 306 | + { |
|
| 307 | + return $this->job->setDatePublishStart($datePublishStart); |
|
| 308 | + } |
|
| 309 | 309 | |
| 310 | 310 | /** |
| 311 | - * @see \Jobs\Entity\JobInterface::setHistory() |
|
| 312 | - */ |
|
| 313 | - public function setHistory(\Doctrine\Common\Collections\Collection $history) |
|
| 314 | - { |
|
| 315 | - return $this->job->setHistory($history); |
|
| 316 | - } |
|
| 311 | + * @see \Jobs\Entity\JobInterface::setHistory() |
|
| 312 | + */ |
|
| 313 | + public function setHistory(\Doctrine\Common\Collections\Collection $history) |
|
| 314 | + { |
|
| 315 | + return $this->job->setHistory($history); |
|
| 316 | + } |
|
| 317 | 317 | |
| 318 | 318 | /** |
| 319 | - * @see \Jobs\Entity\JobInterface::setLanguage() |
|
| 320 | - */ |
|
| 321 | - public function setLanguage($language) |
|
| 322 | - { |
|
| 323 | - return $this->job->setLanguage($language); |
|
| 324 | - } |
|
| 325 | - |
|
| 319 | + * @see \Jobs\Entity\JobInterface::setLanguage() |
|
| 320 | + */ |
|
| 321 | + public function setLanguage($language) |
|
| 322 | + { |
|
| 323 | + return $this->job->setLanguage($language); |
|
| 324 | + } |
|
| 325 | + |
|
| 326 | 326 | /** |
| 327 | - * @see \Jobs\Entity\JobInterface::setLink() |
|
| 328 | - */ |
|
| 329 | - public function setLink($link) |
|
| 330 | - { |
|
| 331 | - return $this->job->setLink($link); |
|
| 332 | - } |
|
| 333 | - |
|
| 327 | + * @see \Jobs\Entity\JobInterface::setLink() |
|
| 328 | + */ |
|
| 329 | + public function setLink($link) |
|
| 330 | + { |
|
| 331 | + return $this->job->setLink($link); |
|
| 332 | + } |
|
| 333 | + |
|
| 334 | 334 | /** |
| 335 | - * @see \Jobs\Entity\JobInterface::setLocation() |
|
| 336 | - */ |
|
| 337 | - public function setLocation($location) |
|
| 338 | - { |
|
| 339 | - return $this->job->setLocation($location); |
|
| 340 | - } |
|
| 341 | - |
|
| 335 | + * @see \Jobs\Entity\JobInterface::setLocation() |
|
| 336 | + */ |
|
| 337 | + public function setLocation($location) |
|
| 338 | + { |
|
| 339 | + return $this->job->setLocation($location); |
|
| 340 | + } |
|
| 341 | + |
|
| 342 | 342 | /** |
| 343 | - * @see \Jobs\Entity\JobInterface::setLocations() |
|
| 344 | - */ |
|
| 345 | - public function setLocations($locations) |
|
| 346 | - { |
|
| 347 | - return $this->job->setLocations($locations); |
|
| 348 | - } |
|
| 349 | - |
|
| 343 | + * @see \Jobs\Entity\JobInterface::setLocations() |
|
| 344 | + */ |
|
| 345 | + public function setLocations($locations) |
|
| 346 | + { |
|
| 347 | + return $this->job->setLocations($locations); |
|
| 348 | + } |
|
| 349 | + |
|
| 350 | 350 | /** |
| 351 | - * @see \Jobs\Entity\JobInterface::setOrganization() |
|
| 352 | - */ |
|
| 353 | - public function setOrganization(\Organizations\Entity\OrganizationInterface $organization = null) |
|
| 354 | - { |
|
| 355 | - return $this->job->setOrganization($organization); |
|
| 356 | - } |
|
| 357 | - |
|
| 351 | + * @see \Jobs\Entity\JobInterface::setOrganization() |
|
| 352 | + */ |
|
| 353 | + public function setOrganization(\Organizations\Entity\OrganizationInterface $organization = null) |
|
| 354 | + { |
|
| 355 | + return $this->job->setOrganization($organization); |
|
| 356 | + } |
|
| 357 | + |
|
| 358 | 358 | /** |
| 359 | - * @see \Jobs\Entity\JobInterface::setPortals() |
|
| 360 | - */ |
|
| 361 | - public function setPortals(array $portals) |
|
| 362 | - { |
|
| 363 | - return $this->job->setPortals($portals); |
|
| 364 | - } |
|
| 365 | - |
|
| 359 | + * @see \Jobs\Entity\JobInterface::setPortals() |
|
| 360 | + */ |
|
| 361 | + public function setPortals(array $portals) |
|
| 362 | + { |
|
| 363 | + return $this->job->setPortals($portals); |
|
| 364 | + } |
|
| 365 | + |
|
| 366 | 366 | /** |
| 367 | - * @see \Jobs\Entity\JobInterface::setReference() |
|
| 368 | - */ |
|
| 369 | - public function setReference($reference) |
|
| 370 | - { |
|
| 371 | - return $this->job->setReference($reference); |
|
| 372 | - } |
|
| 373 | - |
|
| 367 | + * @see \Jobs\Entity\JobInterface::setReference() |
|
| 368 | + */ |
|
| 369 | + public function setReference($reference) |
|
| 370 | + { |
|
| 371 | + return $this->job->setReference($reference); |
|
| 372 | + } |
|
| 373 | + |
|
| 374 | 374 | /** |
| 375 | - * @see \Jobs\Entity\JobInterface::setStatus() |
|
| 376 | - */ |
|
| 377 | - public function setStatus($status) |
|
| 378 | - { |
|
| 379 | - return $this->job->setStatus($status); |
|
| 380 | - } |
|
| 381 | - |
|
| 375 | + * @see \Jobs\Entity\JobInterface::setStatus() |
|
| 376 | + */ |
|
| 377 | + public function setStatus($status) |
|
| 378 | + { |
|
| 379 | + return $this->job->setStatus($status); |
|
| 380 | + } |
|
| 381 | + |
|
| 382 | 382 | /** |
| 383 | - * @see \Jobs\Entity\JobInterface::setTermsAccepted() |
|
| 384 | - */ |
|
| 385 | - public function setTermsAccepted($flag) |
|
| 386 | - { |
|
| 387 | - return $this->job->setTermsAccepted($flag); |
|
| 388 | - } |
|
| 389 | - |
|
| 383 | + * @see \Jobs\Entity\JobInterface::setTermsAccepted() |
|
| 384 | + */ |
|
| 385 | + public function setTermsAccepted($flag) |
|
| 386 | + { |
|
| 387 | + return $this->job->setTermsAccepted($flag); |
|
| 388 | + } |
|
| 389 | + |
|
| 390 | 390 | /** |
| 391 | - * @see \Jobs\Entity\JobInterface::setTitle() |
|
| 392 | - */ |
|
| 393 | - public function setTitle($title) |
|
| 394 | - { |
|
| 395 | - return $this->job->setTitle($title); |
|
| 396 | - } |
|
| 397 | - |
|
| 391 | + * @see \Jobs\Entity\JobInterface::setTitle() |
|
| 392 | + */ |
|
| 393 | + public function setTitle($title) |
|
| 394 | + { |
|
| 395 | + return $this->job->setTitle($title); |
|
| 396 | + } |
|
| 397 | + |
|
| 398 | 398 | /** |
| 399 | - * @see \Jobs\Entity\JobInterface::setUriApply() |
|
| 400 | - */ |
|
| 401 | - public function setUriApply($uriApply) |
|
| 402 | - { |
|
| 403 | - return $this->job->setUriApply($uriApply); |
|
| 404 | - } |
|
| 405 | - |
|
| 399 | + * @see \Jobs\Entity\JobInterface::setUriApply() |
|
| 400 | + */ |
|
| 401 | + public function setUriApply($uriApply) |
|
| 402 | + { |
|
| 403 | + return $this->job->setUriApply($uriApply); |
|
| 404 | + } |
|
| 405 | + |
|
| 406 | 406 | /** |
| 407 | - * @see \Jobs\Entity\JobInterface::setUriPublisher() |
|
| 408 | - */ |
|
| 409 | - public function setUriPublisher($uriPublisher) |
|
| 410 | - { |
|
| 411 | - return $this->job->setUriPublisher($uriPublisher); |
|
| 412 | - } |
|
| 413 | - |
|
| 407 | + * @see \Jobs\Entity\JobInterface::setUriPublisher() |
|
| 408 | + */ |
|
| 409 | + public function setUriPublisher($uriPublisher) |
|
| 410 | + { |
|
| 411 | + return $this->job->setUriPublisher($uriPublisher); |
|
| 412 | + } |
|
| 413 | + |
|
| 414 | 414 | /** |
| 415 | - * @see \Jobs\Entity\JobInterface::setUser() |
|
| 416 | - */ |
|
| 417 | - public function setUser(\Auth\Entity\UserInterface $user) |
|
| 418 | - { |
|
| 419 | - return $this->job->setUser($user); |
|
| 420 | - } |
|
| 415 | + * @see \Jobs\Entity\JobInterface::setUser() |
|
| 416 | + */ |
|
| 417 | + public function setUser(\Auth\Entity\UserInterface $user) |
|
| 418 | + { |
|
| 419 | + return $this->job->setUser($user); |
|
| 420 | + } |
|
| 421 | 421 | |
| 422 | 422 | /** |
| 423 | - * @see \Zend\Permissions\Acl\Resource\ResourceInterface::getResourceId() |
|
| 424 | - */ |
|
| 425 | - public function getResourceId() |
|
| 426 | - { |
|
| 427 | - return $this->job->getResourceId(); |
|
| 428 | - } |
|
| 423 | + * @see \Zend\Permissions\Acl\Resource\ResourceInterface::getResourceId() |
|
| 424 | + */ |
|
| 425 | + public function getResourceId() |
|
| 426 | + { |
|
| 427 | + return $this->job->getResourceId(); |
|
| 428 | + } |
|
| 429 | 429 | |
| 430 | 430 | /** |
| 431 | - * @see \Core\Entity\PermissionsAwareInterface::getPermissions() |
|
| 432 | - */ |
|
| 433 | - public function getPermissions() |
|
| 434 | - { |
|
| 435 | - return $this->job->getPermissions(); |
|
| 436 | - } |
|
| 431 | + * @see \Core\Entity\PermissionsAwareInterface::getPermissions() |
|
| 432 | + */ |
|
| 433 | + public function getPermissions() |
|
| 434 | + { |
|
| 435 | + return $this->job->getPermissions(); |
|
| 436 | + } |
|
| 437 | 437 | |
| 438 | 438 | /** |
| 439 | - * @see \Core\Entity\PermissionsAwareInterface::setPermissions() |
|
| 440 | - */ |
|
| 441 | - public function setPermissions(\Core\Entity\PermissionsInterface $permissions) |
|
| 442 | - { |
|
| 443 | - return $this->job->setPermissions($permissions); |
|
| 444 | - } |
|
| 439 | + * @see \Core\Entity\PermissionsAwareInterface::setPermissions() |
|
| 440 | + */ |
|
| 441 | + public function setPermissions(\Core\Entity\PermissionsInterface $permissions) |
|
| 442 | + { |
|
| 443 | + return $this->job->setPermissions($permissions); |
|
| 444 | + } |
|
| 445 | 445 | |
| 446 | - /** |
|
| 447 | - * @param string $key |
|
| 448 | - * @return mixed |
|
| 449 | - */ |
|
| 450 | - protected function getSolrResultValue($key) |
|
| 451 | - { |
|
| 452 | - return isset($this->solrResult[$key]) ? $this->solrResult[$key] : null; |
|
| 453 | - } |
|
| 446 | + /** |
|
| 447 | + * @param string $key |
|
| 448 | + * @return mixed |
|
| 449 | + */ |
|
| 450 | + protected function getSolrResultValue($key) |
|
| 451 | + { |
|
| 452 | + return isset($this->solrResult[$key]) ? $this->solrResult[$key] : null; |
|
| 453 | + } |
|
| 454 | 454 | } |
| 455 | 455 | \ No newline at end of file |
@@ -150,7 +150,7 @@ |
||
| 150 | 150 | ) |
| 151 | 151 | { |
| 152 | 152 | // get concatenated list of cities from the locations |
| 153 | - $locations = trim(implode(', ', array_unique(array_map(function (ArrayAccess $doc) |
|
| 153 | + $locations = trim(implode(', ', array_unique(array_map(function(ArrayAccess $doc) |
|
| 154 | 154 | { |
| 155 | 155 | return isset($doc->city) ? trim($doc->city) : ''; |
| 156 | 156 | }, $this->solrResult['locations']['docs'])))); |
@@ -48,10 +48,10 @@ |
||
| 48 | 48 | $query->addFilterQuery('isActive:1'); |
| 49 | 49 | $query->addField('*'); |
| 50 | 50 | |
| 51 | - if(isset($params['location'])){ |
|
| 51 | + if (isset($params['location'])) { |
|
| 52 | 52 | /* @var Location $location */ |
| 53 | 53 | $location = $params['location']; |
| 54 | - if(is_object($location->getCoordinates())){ |
|
| 54 | + if (is_object($location->getCoordinates())) { |
|
| 55 | 55 | $coordinate = Util::convertLocationCoordinates($location); |
| 56 | 56 | |
| 57 | 57 | $query->addFilterQuery( |