@@ 895-913 (lines=19) @@ | ||
892 | * |
|
893 | * @return JsonConverter The module file converter. |
|
894 | */ |
|
895 | public function getLegacyModuleFileConverter() |
|
896 | { |
|
897 | if (!$this->legacyModuleFileConverter) { |
|
898 | $this->legacyModuleFileConverter = new ValidatingConverter( |
|
899 | new MigratingConverter( |
|
900 | $this->getModuleFileConverter(), |
|
901 | ModuleFileConverter::VERSION, |
|
902 | new MigrationManager(array( |
|
903 | // add future migrations here |
|
904 | )) |
|
905 | ), |
|
906 | function (stdClass $jsonData) { |
|
907 | return __DIR__.'/../../res/schema/module-schema-'.$jsonData->version.'.json'; |
|
908 | } |
|
909 | ); |
|
910 | } |
|
911 | ||
912 | return $this->legacyModuleFileConverter; |
|
913 | } |
|
914 | ||
915 | /** |
|
916 | * Returns the module file converter. |
|
@@ 937-955 (lines=19) @@ | ||
934 | * |
|
935 | * @return JsonConverter The module file converter. |
|
936 | */ |
|
937 | public function getLegacyRootModuleFileConverter() |
|
938 | { |
|
939 | if (!$this->legacyRootModuleFileConverter) { |
|
940 | $this->legacyRootModuleFileConverter = new ValidatingConverter( |
|
941 | new MigratingConverter( |
|
942 | $this->getRootModuleFileConverter(), |
|
943 | RootModuleFileConverter::VERSION, |
|
944 | new MigrationManager(array( |
|
945 | // add future migrations here |
|
946 | )) |
|
947 | ), |
|
948 | function (stdClass $jsonData) { |
|
949 | return __DIR__.'/../../res/schema/module-schema-'.$jsonData->version.'.json'; |
|
950 | } |
|
951 | ); |
|
952 | } |
|
953 | ||
954 | return $this->legacyRootModuleFileConverter; |
|
955 | } |
|
956 | ||
957 | /** |
|
958 | * Returns the JSON encoder. |