1 | <?php |
||
7 | class ConfigurableJsonDocumentLanguageAnalyzer implements JsonDocumentLanguageAnalyzerInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string[] |
||
11 | */ |
||
12 | private $translatableProperties; |
||
13 | |||
14 | /** |
||
15 | * @param string[] $translatableProperties |
||
16 | * List of translatable properties (on top level). |
||
17 | */ |
||
18 | public function __construct( |
||
23 | |||
24 | /** |
||
25 | * @param JsonDocument $jsonDocument |
||
26 | * @return Language[] |
||
27 | */ |
||
28 | public function determineAvailableLanguages(JsonDocument $jsonDocument) |
||
46 | |||
47 | /** |
||
48 | * @param JsonDocument $jsonDocument |
||
49 | * @return Language[] |
||
50 | */ |
||
51 | public function determineCompletedLanguages(JsonDocument $jsonDocument) |
||
77 | |||
78 | /** |
||
79 | * @param \stdClass $json |
||
80 | * @param string $propertyName |
||
81 | * @return string[] |
||
82 | */ |
||
83 | private function getLanguageStrings(\stdClass $json, $propertyName) |
||
91 | |||
92 | /** |
||
93 | * @param \stdClass $json |
||
94 | * @param string $propertyName |
||
95 | * @return string[] |
||
96 | */ |
||
97 | private function getLanguageStringsFromProperty(\stdClass $json, $propertyName) |
||
107 | |||
108 | /** |
||
109 | * @param \stdClass $json |
||
110 | * @param string $propertyName |
||
111 | * @return string[] |
||
112 | */ |
||
113 | private function getLanguageStringsFromNestedProperty(\stdClass $json, $propertyName) |
||
133 | |||
134 | /** |
||
135 | * @param string[] $languageStrings |
||
136 | * @return Language[] |
||
137 | */ |
||
138 | private function getLanguageStringsAsValueObjects(array $languageStrings) |
||
147 | } |
||
148 |