translations = $translations; $this->source_language = $source_language; $this->target_language = $target_language; } /** * @return string */ public function get_source_language() { return $this->source_language; } /** * @return string */ public function get_target_language() { return $this->target_language; } public function getIterator() { return new ArrayIterator( $this->translations ); } /** * @return array */ public function to_array() { return [ 'source_language' => $this->source_language, 'target_language' => $this->target_language, 'translations' => Fns::map( invoke( 'to_array' ), $this->translations ), ]; } }