$action ) { if ( ! is_string( $lang ) || ! in_array( $action, $possible_actions, true ) ) { throw new InvalidArgumentException( 'Target languages must be an associative array with the language code as a key and the action as a numeric value.' ); } } $this->element_id = $element_id; $this->element_type = $element_type; $this->source_lang = $source_lang; $this->target_langs = $target_languages; $this->media_to_translations = $media_to_translations; } /** * @return int */ public function get_element_id() { return $this->element_id; } /** * @return string */ public function get_element_type() { return $this->element_type; } /** * @return string */ public function get_source_lang() { return $this->source_lang; } /** * @return string[] */ public function get_target_langs() { return $this->target_langs; } /** * @return mixed */ public function get_media_to_translations() { return $this->media_to_translations; } }