first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
/**
* Class WPML_TF_Translation_Queue_Hooks_Factory
*
* @author OnTheGoSystems
*/
class WPML_TF_Translation_Queue_Hooks_Factory extends WPML_Current_Screen_Loader_Factory {
/** @return string */
protected function get_screen_regex() {
return '/translations-queue/';
}
/** @return WPML_TF_Translation_Queue_Hooks */
protected function create_hooks() {
$feedback_storage = new WPML_TF_Data_Object_Storage( new WPML_TF_Feedback_Post_Convert() );
return new WPML_TF_Translation_Queue_Hooks( $feedback_storage );
}
}

View File

@@ -0,0 +1,18 @@
<?php
/**
* Class WPML_TF_Translation_Service_Change_Hooks_Factory
*
* @author OnTheGoSystems
*/
class WPML_TF_Translation_Service_Change_Hooks_Factory implements IWPML_Backend_Action_Loader {
/** @return WPML_TF_Translation_Service_Change_Hooks */
public function create() {
return new WPML_TF_Translation_Service_Change_Hooks(
new WPML_TF_Settings_Read(),
new WPML_TF_Settings_Write(),
new WPML_TF_TP_Ratings_Synchronize_Factory()
);
}
}

View File

@@ -0,0 +1,17 @@
<?php
/**
* Class WPML_TF_Common_Hooks_Factory
*
* @author OnTheGoSystems
*/
class WPML_TF_WP_Cron_Events_Factory implements IWPML_Backend_Action_Loader, IWPML_Frontend_Action_Loader {
/** @return WPML_TF_WP_Cron_Events */
public function create() {
return new WPML_TF_WP_Cron_Events(
new WPML_TF_Settings_Read(),
new WPML_TF_TP_Ratings_Synchronize_Factory()
);
}
}

View File

@@ -0,0 +1,17 @@
<?php
/**
* Class WPML_TF_XML_RPC_Hooks_Factory
*
* @author OnTheGoSystems
*/
class WPML_TF_XML_RPC_Hooks_Factory implements IWPML_Frontend_Action_Loader {
/** @return WPML_TF_XML_RPC_Hooks */
public function create() {
return new WPML_TF_XML_RPC_Hooks(
new WPML_TF_XML_RPC_Feedback_Update_Factory(),
new WPML_WP_API()
);
}
}

View File

@@ -0,0 +1,14 @@
<?php
/**
* Class WPML_TM_TF_AJAX_Feedback_List_Hooks_Factory
*
* @author OnTheGoSystems
*/
class WPML_TM_TF_AJAX_Feedback_List_Hooks_Factory implements IWPML_AJAX_Action_Loader {
/** @return WPML_TM_TF_Feedback_List_Hooks */
public function create() {
return new WPML_TM_TF_Feedback_List_Hooks();
}
}

View File

@@ -0,0 +1,19 @@
<?php
/**
* Class WPML_TM_TF_Feedback_List_Hooks_Factory
*
* @author OnTheGoSystems
*/
class WPML_TM_TF_Feedback_List_Hooks_Factory extends WPML_Current_Screen_Loader_Factory {
/** @return string */
protected function get_screen_regex() {
return '/wpml-translation-feedback-list/';
}
/** @return WPML_TM_TF_Feedback_List_Hooks */
protected function create_hooks() {
return new WPML_TM_TF_Feedback_List_Hooks();
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* Class WPML_TF_TP_Ratings_Synchronize
*
* @author OnTheGoSystems
*/
class WPML_TF_TP_Ratings_Synchronize_Factory {
/**
* @return WPML_TF_TP_Ratings_Synchronize
*/
public function create() {
$tp_client_factory = new WPML_TP_Client_Factory();
$tp_client = $tp_client_factory->create();
return new WPML_TF_TP_Ratings_Synchronize(
new WPML_TF_Data_Object_Storage( new WPML_TF_Feedback_Post_Convert() ),
$tp_client->ratings()
);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
* Class WPML_TF_XML_RPC_Feedback_Update_Factory
*
* @author OnTheGoSystems
*/
class WPML_TF_XML_RPC_Feedback_Update_Factory {
/** @return WPML_TF_XML_RPC_Feedback_Update */
public function create() {
global $sitepress;
$translation_service = $sitepress->get_setting( 'translation_service' );
$translation_projects = $sitepress->get_setting( 'icl_translation_projects' );
$tp_project = new WPML_TP_Project( $translation_service, $translation_projects );
$feedback_storage = new WPML_TF_Data_Object_Storage( new WPML_TF_Feedback_Post_Convert() );
return new WPML_TF_XML_RPC_Feedback_Update( $feedback_storage, $tp_project );
}
}