File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121abstract class AbstractRequest implements Request
2222{
23- private const BASE_URL = 'https://xmlopen.rejseplanen.dk/bin/rest.exe/ ' ;
23+ protected const BASE_URL = 'https://xmlopen.rejseplanen.dk/bin/rest.exe/ ' ;
2424 private const API_NAME = 'rejseplan_php_api ' ;
2525 private const API_VERSION = '3.0 ' ;
2626 private const USER_AGENT = self ::API_NAME .'/ ' .self ::API_VERSION ;
@@ -126,7 +126,7 @@ abstract protected function configure(OptionsResolver $resolver): void;
126126
127127 abstract protected function getUrl (): string ;
128128
129- private function makeUrl (): string
129+ protected function makeUrl (): string
130130 {
131131 $ query = array_merge (['format ' => 'json ' ], $ this ->getQuery ());
132132 $ query = http_build_query ($ query );
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ protected function configure(OptionsResolver $resolver): void
3434 $ resolver ->setRequired (['ref ' ]);
3535 }
3636
37+ protected function makeUrl (): string
38+ {
39+ return sprintf ('%s%s ' , self ::BASE_URL , $ this ->options ['ref ' ]);
40+ }
41+
3742 protected function getUrl (): string
3843 {
3944 return 'journeyDetails ' ;
You can’t perform that action at this time.
0 commit comments