|
|
|
|
@ -110,6 +110,28 @@ final class use_io { |
|
|
|
|
public $use_db_filter; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final class use_iol { |
|
|
|
|
public static function auto_wire( |
|
|
|
|
string $root_folder, |
|
|
|
|
string $folder, |
|
|
|
|
string $method = 'index', |
|
|
|
|
string $db_service= 'db_mocker' |
|
|
|
|
) { |
|
|
|
|
$project = rtrim(\tts\site_helper::get_project(), '/'); |
|
|
|
|
|
|
|
|
|
\tts\main\registry::set('db', \tts\main\registry::get('di')->get_service($db_service) ); |
|
|
|
|
|
|
|
|
|
$class_name = "\\prj\\{$project}\\inputs\\{$root_folder}\\{$folder}_in"; |
|
|
|
|
$input = $class_name::$method(); |
|
|
|
|
|
|
|
|
|
$class_name = "\\prj\\{$project}\\logic\\{$root_folder}\\{$folder}_logic"; |
|
|
|
|
$class_name::$method($input); |
|
|
|
|
|
|
|
|
|
$class_name = "\\prj\\{$project}\\outputs\\{$root_folder}\\{$folder}_out"; |
|
|
|
|
return $class_name::$method($input); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final class safer_io { |
|
|
|
|
|
|
|
|
|
protected function __construct() { |
|
|
|
|
|