/** * */ public function __construct($example) { parent::__construct($example); if (isset($example->tr)) { foreach ($example->tr as $translation) { $this->translations[] = $translation->text; } } }
/** * */ public function __construct($definition) { parent::__construct($definition); if (isset($definition->ts)) { $this->transcription = $definition->ts; } if (isset($definition->tr)) { foreach ($definition->tr as $translation) { $this->translations[] = new DictionaryTranslation($translation); } } }
/** * */ public function __construct($translation) { parent::__construct($translation); if (isset($translation->syn)) { foreach ($translation->syn as $synonym) { $this->synonyms[] = new DictionaryBaseItem($synonym); } } if (isset($translation->mean)) { foreach ($translation->mean as $meaning) { $this->meanings[] = new DictionaryBaseItem($meaning); } } if (isset($translation->ex)) { foreach ($translation->ex as $example) { $this->examples[] = new DictionaryExample($example); } } }