Dear all,
I have been trying to get the full url of my omeka-s install while performing a Job in a class that extends AbstractJob
. The way I am trying to do it is the following :
$serverUrl = $this->getServiceLocator()->get('ViewHelperManager')->get('serverUrl');
$this->logger->info("[AbstractJob] : ServerUrl: ".$serverUrl());
When running the job, I get the following in my logs :
[AbstractJob] : ServerUrl: http:// {"userId":1,"jobId":1494}
If I try to run the same script from a function in Module.php which extends AbstractModule
I get the following result:
[AbstractModule] : ServerUrl: http://127.0.0.1 {"userId":1}
What would be the best way to be able from my job to have a serverUrl that contains the full URL to my site?
Best regards,
Sylvain