/** * Replaces the specified model in teh model relation chain with teh join model. * Eg EE_Model_Parser::replace_model_name_with_join_model_name_in_model_relation_chain( * "Ticket", "Datetime_Ticket", "Datetime.Ticket" ) will return * "Datetime.Datetime_Ticket" which can be used to find the table alias model relation chain prefix * using EE_Model_Parser::extract_table_alias_model_relation_chain_prefix * @param string $model_name * @param string $join_model_name * @param string $model_relation_chain * @return string */ public static function replace_model_name_with_join_model_name_in_model_relation_chain($model_name, $join_model_name, $model_relation_chain) { $model_name = EE_Model_Parser::pad_with_periods($model_name); $join_model_name = EE_Model_Parser::pad_with_periods($join_model_name); $model_relation_chain = EE_Model_Parser::pad_with_periods($model_relation_chain); $replaced_with_periods = str_replace($model_name, $join_model_name, $model_relation_chain); return EE_Model_Parser::trim_periods($replaced_with_periods); }