New namespaces bs_tts and main_tts

main
Robert 3 years ago
parent c462cf755e
commit f0799885f3
  1. 8
      UnitTestFiles/Test/tts_setup.php
  2. 8
      cli_cron
  3. 6
      public/main.page
  4. 18
      src/configs/ex/loadall.php
  5. 2
      src/configs/ex/on_email.php
  6. 2
      src/configs/ex/on_html.php
  7. 2
      src/configs/ex/on_http_request.php
  8. 2
      src/configs/ex/on_security.php
  9. 2
      src/configs/ex/on_sessions.php
  10. 4
      src/configs/ex/on_tts.php
  11. 2
      src/configs/ex/on_view_mode.php
  12. 2
      src/configs/live/off_cache.php
  13. 2
      src/configs/live/off_twilio.php
  14. 2
      src/configs/live/on_database.php
  15. 2
      src/configs/live/on_email.php
  16. 2
      src/configs/live/on_html.php
  17. 2
      src/configs/live/on_http_request.php
  18. 2
      src/configs/live/on_security.php
  19. 2
      src/configs/live/on_sessions.php
  20. 4
      src/configs/live/on_tts.php
  21. 2
      src/configs/live/on_view_mode.php
  22. 20
      src/configs/mockup/loadall.php
  23. 2
      src/configs/mockup/on_email.php
  24. 2
      src/configs/mockup/on_html.php
  25. 2
      src/configs/mockup/on_http_request.php
  26. 2
      src/configs/mockup/on_security.php
  27. 2
      src/configs/mockup/on_sessions.php
  28. 4
      src/configs/mockup/on_tts.php
  29. 2
      src/configs/mockup/on_view_mode.php
  30. 17
      src/ex/controllers/app/home_ctrl.php
  31. 12
      src/ex/inputs/app/home_in.php
  32. 4
      src/ex/logic/app/home_logic.php
  33. 6
      src/ex/outputs/app/home_out.php
  34. 4
      src/ex/outputs/bills/notices_out.php
  35. 19
      src/mockup/controllers/app/home_ctrl.php
  36. 14
      src/mockup/go_text_templates/ctrl.txt
  37. 12
      src/mockup/go_text_templates/inputs.txt
  38. 4
      src/mockup/go_text_templates/logic.txt
  39. 6
      src/mockup/go_text_templates/outputs.txt
  40. 12
      src/mockup/inputs/app/home_in.php
  41. 4
      src/mockup/logic/app/home_logic.php
  42. 6
      src/mockup/outputs/app/home_out.php
  43. 4
      src/mockup/outputs/bills/notices_out.php
  44. 8
      src/services/ex/loadall.php
  45. 2
      src/services/ex/on_html_filter.php
  46. 2
      src/services/ex/on_log.php
  47. 2
      src/services/ex/on_templates.php
  48. 2
      src/services/ex/on_test_db.php
  49. 8
      src/services/live/off_cache.php
  50. 2
      src/services/live/off_test_db.php
  51. 2
      src/services/live/on_crypto.php
  52. 16
      src/services/live/on_db.php
  53. 2
      src/services/live/on_debugger.php
  54. 2
      src/services/live/on_emailer.php
  55. 2
      src/services/live/on_encryption.php
  56. 2
      src/services/live/on_html_filter.php
  57. 4
      src/services/live/on_http_request.php
  58. 2
      src/services/live/on_log.php
  59. 2
      src/services/live/on_passwords.php
  60. 4
      src/services/live/on_session.php
  61. 2
      src/services/live/on_templates.php
  62. 2
      src/services/live/on_twillio.php
  63. 8
      src/services/mockup/loadall.php
  64. 2
      src/services/mockup/on_html_filter.php
  65. 2
      src/services/mockup/on_log.php
  66. 2
      src/services/mockup/on_templates.php
  67. 2
      src/services/mockup/on_test_db.php

@ -27,17 +27,17 @@ class tts_setup {
$p_dir = dirname(__DIR__, 2) . "/src/"; $p_dir = dirname(__DIR__, 2) . "/src/";
require_once $p_dir . 'before_main.php'; require_once $p_dir . 'before_main.php';
\tts\site_helper::set_all_projects(['mockup', 'ex', 'live']); \bs_tts\site_helper::set_all_projects(['mockup', 'ex', 'live']);
\tts\site_helper::set_default_project("mockup"); \bs_tts\site_helper::set_default_project("mockup");
\tts\site_helper::init(PROJECT_BASE_DIR, "", "get", true); \bs_tts\site_helper::init(PROJECT_BASE_DIR, "", "get", true);
require_once PROJECT_BASE_DIR . 'main.php'; require_once PROJECT_BASE_DIR . 'main.php';
} }
public static function test_route(string $route): void { public static function test_route(string $route): void {
$PHPUNIT_Testing = true; $PHPUNIT_Testing = true;
\tts\site_helper::init(PROJECT_BASE_DIR, $route, "get", $PHPUNIT_Testing); \bs_tts\site_helper::init(PROJECT_BASE_DIR, $route, "get", $PHPUNIT_Testing);
} }
public static function do_routes() { public static function do_routes() {

@ -4,13 +4,13 @@
declare(strict_types=1); declare(strict_types=1);
require 'src/before_main.php'; require 'src/before_main.php';
\tts\site_helper::set_all_projects(['mockup','ex','live']); \bs_tts\site_helper::set_all_projects(['mockup','ex','live']);
\tts\site_helper::set_default_project("mockup"); \bs_tts\site_helper::set_default_project("mockup");
$PHPUNIT_Testing = false; $PHPUNIT_Testing = false;
$cli_args = \tts\site_helper::get_cli_args(); $cli_args = \bs_tts\site_helper::get_cli_args();
\tts\site_helper::init(PROJECT_BASE_DIR, $cli_args, "get", $PHPUNIT_Testing); \bs_tts\site_helper::init(PROJECT_BASE_DIR, $cli_args, "get", $PHPUNIT_Testing);
require 'src/main.php'; require 'src/main.php';

@ -3,11 +3,11 @@
declare(strict_types=1); declare(strict_types=1);
require '../src/before_main.php'; require '../src/before_main.php';
\tts\site_helper::set_all_projects(['mockup','ex','live']); \bs_tts\site_helper::set_all_projects(['mockup','ex','live']);
\tts\site_helper::set_default_project("mockup"); \bs_tts\site_helper::set_default_project("mockup");
$PHPUNIT_Testing = false; $PHPUNIT_Testing = false;
\tts\site_helper::init(PROJECT_BASE_DIR, $_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD'], $PHPUNIT_Testing); \bs_tts\site_helper::init(PROJECT_BASE_DIR, $_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD'], $PHPUNIT_Testing);
require '../src/main.php'; require '../src/main.php';

@ -1,13 +1,11 @@
<?php <?php
declare(strict_types=1);
/* /*
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration! * This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration!
*/ */
/* Contents of : on_email.php */ /* Contents of : on_email.php */
\tts\main\configure::set('email', array( \main_tts\configure::set('email', array(
// 'host' => '', // SMTP Hosts - seperated by ; // 'host' => '', // SMTP Hosts - seperated by ;
// 'username' => '', // 'username' => '',
// 'password' => '', // 'password' => '',
@ -17,7 +15,7 @@ declare(strict_types=1);
)); ));
/* Contents of : on_html.php */ /* Contents of : on_html.php */
\tts\main\configure::set('html', array( \main_tts\configure::set('html', array(
'author' => 'Robert Strutts', 'author' => 'Robert Strutts',
'title' => 'In Example Project...', 'title' => 'In Example Project...',
'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project' 'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project'
@ -27,13 +25,13 @@ declare(strict_types=1);
)); ));
/* Contents of : on_http_request.php */ /* Contents of : on_http_request.php */
\tts\main\configure::set('http_request', array( \main_tts\configure::set('http_request', array(
'use' => 'sockets', // curl or sockets 'use' => 'sockets', // curl or sockets
)); ));
/* Contents of : on_security.php */ /* Contents of : on_security.php */
\tts\main\configure::set('security', array( \main_tts\configure::set('security', array(
'show_dumps' => true, 'show_dumps' => true,
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==', 'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==',
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1', 'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1',
@ -46,7 +44,7 @@ declare(strict_types=1);
/* Contents of : on_sessions.php */ /* Contents of : on_sessions.php */
\tts\main\configure::set('sessions', array( \main_tts\configure::set('sessions', array(
'engine' => 'php', // php, db 'engine' => 'php', // php, db
'type' => 'none', // Session Type: files, database, or cache 'type' => 'none', // Session Type: files, database, or cache
'session_variable' => 'ses_app_aaa_', // set session variable name for project 'session_variable' => 'ses_app_aaa_', // set session variable name for project
@ -57,9 +55,9 @@ declare(strict_types=1);
)); ));
/* Contents of : on_tts.php */ /* Contents of : on_tts.php */
\tts\main\configure::set_key('important', 'private_ip_as_local', false); \main_tts\configure::set_key('important', 'private_ip_as_local', false);
\tts\main\configure::set('tts', array( \main_tts\configure::set('tts', array(
'error_page' => 'tts', // or project 'error_page' => 'tts', // or project
'404_page' => 'tts', // or project '404_page' => 'tts', // or project
'ui_kit' => 'tts', // or project 'ui_kit' => 'tts', // or project
@ -72,6 +70,6 @@ declare(strict_types=1);
/* Contents of : on_view_mode.php */ /* Contents of : on_view_mode.php */
\tts\main\configure::set('view_mode', array( \main_tts\configure::set('view_mode', array(
'default_paths' => array('json', 'common', 'flexbox', 'default') 'default_paths' => array('json', 'common', 'flexbox', 'default')
)); ));

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('email', array( \main_tts\configure::set('email', array(
// 'host' => '', // SMTP Hosts - seperated by ; // 'host' => '', // SMTP Hosts - seperated by ;
// 'username' => '', // 'username' => '',
// 'password' => '', // 'password' => '',

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('html', array( \main_tts\configure::set('html', array(
'author' => 'Robert Strutts', 'author' => 'Robert Strutts',
'title' => 'In Example Project...', 'title' => 'In Example Project...',
'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project' 'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project'

@ -1,5 +1,5 @@
<?php <?php
\tts\main\configure::set('http_request', array( \main_tts\configure::set('http_request', array(
'use' => 'sockets', // curl or sockets 'use' => 'sockets', // curl or sockets
)); ));

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('security', array( \main_tts\configure::set('security', array(
'show_dumps' => true, 'show_dumps' => true,
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==', 'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==',
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1', 'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1',

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('sessions', array( \main_tts\configure::set('sessions', array(
'engine' => 'php', // php, db 'engine' => 'php', // php, db
'type' => 'none', // Session Type: files, database, or cache 'type' => 'none', // Session Type: files, database, or cache
'session_variable' => 'ses_app_aaa_', // set session variable name for project 'session_variable' => 'ses_app_aaa_', // set session variable name for project

@ -1,8 +1,8 @@
<?php <?php
\tts\main\configure::set_key('important', 'private_ip_as_local', false); \main_tts\configure::set_key('important', 'private_ip_as_local', false);
\tts\main\configure::set('tts', array( \main_tts\configure::set('tts', array(
'error_page' => 'tts', // or project 'error_page' => 'tts', // or project
'404_page' => 'tts', // or project '404_page' => 'tts', // or project
'ui_kit' => 'tts', // or project 'ui_kit' => 'tts', // or project

@ -1,5 +1,5 @@
<?php <?php
\tts\main\configure::set('view_mode', array( \main_tts\configure::set('view_mode', array(
'default_paths' => array('json', 'common', 'flexbox', 'default') 'default_paths' => array('json', 'common', 'flexbox', 'default')
)); ));

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('cache', array( \main_tts\configure::set('cache', array(
'enabled' => false, 'enabled' => false,
'log_cache_hits' => false, 'log_cache_hits' => false,
'engine' => 'redis', // redis, files, none 'engine' => 'redis', // redis, files, none

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('twilio', array( \main_tts\configure::set('twilio', array(
'AccountSid' => '____ADD_ME_HERE____', 'AccountSid' => '____ADD_ME_HERE____',
'AuthToken' => '____ADD_ME_HERE____', 'AuthToken' => '____ADD_ME_HERE____',
'send_on_errors' => false, 'send_on_errors' => false,

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('database', array( \main_tts\configure::set('database', array(
// PDO::ERRMODE_WARNING // PDO::ERRMODE_WARNING
// PDO::ERRMODE_SILENT // PDO::ERRMODE_SILENT
// PDO::ERRMODE_EXCEPTION // PDO::ERRMODE_EXCEPTION

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('email', array( \main_tts\configure::set('email', array(
// 'host' => '', // SMTP Hosts - seperated by ; // 'host' => '', // SMTP Hosts - seperated by ;
// 'username' => '', // 'username' => '',
// 'password' => '', // 'password' => '',

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('html', array( \main_tts\configure::set('html', array(
'title' => 'My Cool Project', 'title' => 'My Cool Project',
'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project' 'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project'
'robots' => 'noindex', 'robots' => 'noindex',

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('http_request', array( \main_tts\configure::set('http_request', array(
'use' => 'sockets', // curl or sockets 'use' => 'sockets', // curl or sockets
)); ));

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('security', array( \main_tts\configure::set('security', array(
'show_dumps' => true, 'show_dumps' => true,
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==', 'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==',
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1', 'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1',

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('sessions', array( \main_tts\configure::set('sessions', array(
'engine' => 'php', // php, db 'engine' => 'php', // php, db
'type' => 'none', // Session Type: files, database, or cache 'type' => 'none', // Session Type: files, database, or cache
'session_variable' => 'ses_app_PROJECT_NAME', // set session variable name for project 'session_variable' => 'ses_app_PROJECT_NAME', // set session variable name for project

@ -2,9 +2,9 @@
declare(strict_types=1); declare(strict_types=1);
//\tts\main\configure::update('important', 'private_ip_as_local', true); //\main_tts\configure::update('important', 'private_ip_as_local', true);
\tts\main\configure::set('tts', array( \main_tts\configure::set('tts', array(
'error_page' => 'tts', // or project 'error_page' => 'tts', // or project
'404_page' => 'tts', // or project '404_page' => 'tts', // or project
'ui_kit' => 'tts', // or project 'ui_kit' => 'tts', // or project

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\configure::set('view_mode', array( \main_tts\configure::set('view_mode', array(
'default_paths' => array('default', 'common') 'default_paths' => array('default', 'common')
)); ));

@ -1,13 +1,11 @@
<?php <?php
declare(strict_types=1);
/* /*
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration! * This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration!
*/ */
/* Contents of : on_email.php */ /* Contents of : on_email.php */
\tts\main\configure::set('email', array( \main_tts\configure::set('email', array(
// 'host' => '', // SMTP Hosts - seperated by ; // 'host' => '', // SMTP Hosts - seperated by ;
// 'username' => '', // 'username' => '',
// 'password' => '', // 'password' => '',
@ -17,24 +15,24 @@ declare(strict_types=1);
)); ));
/* Contents of : on_html.php */ /* Contents of : on_html.php */
\tts\main\configure::set('html', array( \main_tts\configure::set('html', array(
'title' => 'In Mockup...', 'title' => 'In Mockup...',
'author' => 'Robert Strutts', 'author' => 'Robert Strutts',
'javascript' => array('js/tts.min.js'=>'assets'), //'js/analytics.js'=>'project' 'javascript' => array('js/tts.min.js'=>'assets'), //'js/analytics.js'=>'project'
'css' => array('css/style.css'=>['path'=>'project', 'media'=>'all']), 'css' => array('css/style.css'=>'project'),
'robots' => 'noindex', 'robots' => 'noindex',
'keywords' => '', 'keywords' => '',
'description' => '', 'description' => '',
)); ));
/* Contents of : on_http_request.php */ /* Contents of : on_http_request.php */
\tts\main\configure::set('http_request', array( \main_tts\configure::set('http_request', array(
'use' => 'sockets', // curl or sockets 'use' => 'sockets', // curl or sockets
)); ));
/* Contents of : on_security.php */ /* Contents of : on_security.php */
\tts\main\configure::set('security', array( \main_tts\configure::set('security', array(
'show_dumps' => true, 'show_dumps' => true,
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==', 'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==',
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1', 'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1',
@ -47,7 +45,7 @@ declare(strict_types=1);
/* Contents of : on_sessions.php */ /* Contents of : on_sessions.php */
\tts\main\configure::set('sessions', array( \main_tts\configure::set('sessions', array(
'engine' => 'php', // php, db 'engine' => 'php', // php, db
'type' => 'none', // Session Type: files, database, or cache 'type' => 'none', // Session Type: files, database, or cache
'session_variable' => 'ses_app_aaa_', // set session variable name for project 'session_variable' => 'ses_app_aaa_', // set session variable name for project
@ -58,9 +56,9 @@ declare(strict_types=1);
)); ));
/* Contents of : on_tts.php */ /* Contents of : on_tts.php */
\tts\main\configure::set_key('important', 'private_ip_as_local', false); \main_tts\configure::set_key('important', 'private_ip_as_local', false);
\tts\main\configure::set('tts', array( \main_tts\configure::set('tts', array(
'error_page' => 'tts', // or project 'error_page' => 'tts', // or project
'404_page' => 'tts', // or project '404_page' => 'tts', // or project
'ui_kit' => 'tts', // or project 'ui_kit' => 'tts', // or project
@ -73,6 +71,6 @@ declare(strict_types=1);
/* Contents of : on_view_mode.php */ /* Contents of : on_view_mode.php */
\tts\main\configure::set('view_mode', array( \main_tts\configure::set('view_mode', array(
'default_paths' => array('json', 'common', 'flexbox', 'default') 'default_paths' => array('json', 'common', 'flexbox', 'default')
)); ));

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('email', array( \main_tts\configure::set('email', array(
// 'host' => '', // SMTP Hosts - seperated by ; // 'host' => '', // SMTP Hosts - seperated by ;
// 'username' => '', // 'username' => '',
// 'password' => '', // 'password' => '',

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('html', array( \main_tts\configure::set('html', array(
'title' => 'In Mockup...', 'title' => 'In Mockup...',
'author' => 'Robert Strutts', 'author' => 'Robert Strutts',
'javascript' => array('js/tts.min.js'=>'assets'), //'js/analytics.js'=>'project' 'javascript' => array('js/tts.min.js'=>'assets'), //'js/analytics.js'=>'project'

@ -1,5 +1,5 @@
<?php <?php
\tts\main\configure::set('http_request', array( \main_tts\configure::set('http_request', array(
'use' => 'sockets', // curl or sockets 'use' => 'sockets', // curl or sockets
)); ));

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('security', array( \main_tts\configure::set('security', array(
'show_dumps' => true, 'show_dumps' => true,
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==', 'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==',
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1', 'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1',

@ -1,6 +1,6 @@
<?php <?php
\tts\main\configure::set('sessions', array( \main_tts\configure::set('sessions', array(
'engine' => 'php', // php, db 'engine' => 'php', // php, db
'type' => 'none', // Session Type: files, database, or cache 'type' => 'none', // Session Type: files, database, or cache
'session_variable' => 'ses_app_aaa_', // set session variable name for project 'session_variable' => 'ses_app_aaa_', // set session variable name for project

@ -1,8 +1,8 @@
<?php <?php
\tts\main\configure::set_key('important', 'private_ip_as_local', false); \main_tts\configure::set_key('important', 'private_ip_as_local', false);
\tts\main\configure::set('tts', array( \main_tts\configure::set('tts', array(
'error_page' => 'tts', // or project 'error_page' => 'tts', // or project
'404_page' => 'tts', // or project '404_page' => 'tts', // or project
'ui_kit' => 'tts', // or project 'ui_kit' => 'tts', // or project

@ -1,5 +1,5 @@
<?php <?php
\tts\main\configure::set('view_mode', array( \main_tts\configure::set('view_mode', array(
'default_paths' => array('json', 'common', 'flexbox', 'default') 'default_paths' => array('json', 'common', 'flexbox', 'default')
)); ));

@ -4,6 +4,8 @@ declare(strict_types=1);
namespace prj\ex\controllers\app; namespace prj\ex\controllers\app;
use \bs_tts\use_iol as IOL;
class home_ctrl { class home_ctrl {
public $page_output; public $page_output;
@ -28,7 +30,7 @@ class home_ctrl {
} }
public function name_demo_post() { public function name_demo_post() {
$output = \tts\use_iol::auto_wire("app", "home", "name_demo"); $output = IOL::auto_wire("app", "home", "name_demo");
$view = new \tts\view(); $view = new \tts\view();
$view->set('html', new \tts\html_document()); $view->set('html', new \tts\html_document());
@ -38,19 +40,6 @@ class home_ctrl {
$view->render($this); $view->render($this);
} }
public function test($id) {
\tts\common::real_time_output();
echo "bla $id";
echo PHP_EOL;
for ($i=0; $i<10;$i++){
echo $i;
echo str_pad('', 14960);
sleep(1);
}
}
public function error() { tts_broken_error(); } // Needed: To show Live Page for Broken Pages public function error() { tts_broken_error(); } // Needed: To show Live Page for Broken Pages
} }

@ -4,11 +4,11 @@ declare(strict_types=1);
namespace prj\ex\inputs\app; namespace prj\ex\inputs\app;
use \tts\INPUTS; use \bs_tts\INPUTS;
use \tts\FIELD_FILTER; use \bs_tts\FIELD_FILTER;
use \tts\HTML_FLAG; use \bs_tts\HTML_FLAG;
use \tts\DB_FILTER; use \bs_tts\DB_FILTER;
use \tts\use_io as IO; use \bs_tts\use_io as IO;
class home_in { class home_in {
@ -21,7 +21,7 @@ class home_in {
*/ */
public static function name_demo(): array { public static function name_demo(): array {
\tts\safer_io::init_json(); // Staticly set JSON data if any \bs_tts\safer_io::init_json(); // Staticly set JSON data if any
$required_post_string_field = new IO(); $required_post_string_field = new IO();
$required_post_string_field->input_type = INPUTS::post; $required_post_string_field->input_type = INPUTS::post;

@ -4,12 +4,12 @@ declare(strict_types=1);
namespace prj\ex\logic\app; namespace prj\ex\logic\app;
use \tts\safer_io as SafeIO; use \bs_tts\safer_io as SafeIO;
class home_logic { class home_logic {
public static function name_demo(array & $input): void { public static function name_demo(array & $input): void {
$model = new \prj\ex\models\app\home_model(\tts\main\registry::get('db')); $model = new \prj\ex\models\app\home_model(\main_tts\registry::get('db'));
$submitted = true; $submitted = true;
foreach(SafeIO::logic_sanitize($input) as $data) { foreach(SafeIO::logic_sanitize($input) as $data) {

@ -4,7 +4,7 @@ declare(strict_types=1);
namespace prj\ex\outputs\app; namespace prj\ex\outputs\app;
use \tts\safer_io as SafeIO; use \bs_tts\safer_io as SafeIO;
class home_out { class home_out {
@ -21,7 +21,7 @@ class home_out {
$key = $html['name'] ?? ""; $key = $html['name'] ?? "";
$html_output[$key] = $html['html']; $html_output[$key] = $html['html'];
if (\tts\common::get_count($html['errors'])) { if (\bs_tts\common::get_count($html['errors'])) {
$errors[$key] = $html['errors'][$key]; $errors[$key] = $html['errors'][$key];
} }
} }
@ -30,7 +30,7 @@ class home_out {
$first_name = $html_output['first_name'] ?? "Unknown"; $first_name = $html_output['first_name'] ?? "Unknown";
$last_name = $html_output['last_name'] ?? "Unknown"; $last_name = $html_output['last_name'] ?? "Unknown";
$ret['main'] = (\tts\common::get_count($errors)) ? "" : "Hello, {$first_name} {$last_name}, you are {$age} years old!" . PHP_EOL; $ret['main'] = (\bs_tts\common::get_count($errors)) ? "" : "Hello, {$first_name} {$last_name}, you are {$age} years old!" . PHP_EOL;
$ret['errors'] = $errors; $ret['errors'] = $errors;
} else { } else {
$ret['main'] = "Welcome"; $ret['main'] = "Welcome";

@ -24,10 +24,10 @@ class notices_out {
} }
public static function gen_pdf_for_late_payment(string $html_code): void { public static function gen_pdf_for_late_payment(string $html_code): void {
$style_sheet = file_get_contents(\tts\site_helper::get_root() . \tts\site_helper::get_project() . 'views/default/bills/notice_of_late_payment_css.php'); $style_sheet = file_get_contents(\bs_tts\site_helper::get_root() . \bs_tts\site_helper::get_project() . 'views/default/bills/notice_of_late_payment_css.php');
require_once TTS_VENDOR . 'autoload.php'; require_once TTS_VENDOR . 'autoload.php';
$mpdf = new \Mpdf\Mpdf(['tempDir' => \tts\site_helper::get_root() . '/tmp/mpdf']); // chown www-data, chmod 775 $mpdf = new \Mpdf\Mpdf(['tempDir' => \bs_tts\site_helper::get_root() . '/tmp/mpdf']); // chown www-data, chmod 775
$mpdf->AddFontDirectory(PROJECT_ASSETS_DIR . '/fonts'); $mpdf->AddFontDirectory(PROJECT_ASSETS_DIR . '/fonts');
$mpdf->fontdata['jennasue'] = ['R'=>"JennaSue.ttf"]; $mpdf->fontdata['jennasue'] = ['R'=>"JennaSue.ttf"];

@ -4,6 +4,8 @@ declare(strict_types=1);
namespace prj\mockup\controllers\app; namespace prj\mockup\controllers\app;
use \bs_tts\use_iol as IOL;
class home_ctrl { class home_ctrl {
public $page_output; public $page_output;
@ -28,29 +30,14 @@ class home_ctrl {
} }
public function name_demo_post() { public function name_demo_post() {
$output = \tts\use_iol::auto_wire("app", "home", "name_demo");
$view = new \tts\view(); $view = new \tts\view();
$view->set('html', new \tts\html_document()); $view->set('html', new \tts\html_document());
$view->set('output', $output); $view->set('output', IOL::auto_wire("app", "home", "name_demo"));
$view->set_template('main'); $view->set_template('main');
$view->include("app/name_demo_post"); $view->include("app/name_demo_post");
$view->render($this); $view->render($this);
} }
public function test($id) {
\tts\common::real_time_output();
echo "bla $id";
echo PHP_EOL;
for ($i=0; $i<10;$i++){
echo $i;
echo str_pad('', 14960);
sleep(1);
}
}
public function error() { tts_broken_error(); } // Needed: To show Live Page for Broken Pages public function error() { tts_broken_error(); } // Needed: To show Live Page for Broken Pages
} }

@ -4,24 +4,16 @@ declare(strict_types=1);
namespace prj\{{.Root}}\controllers\{{.Subfolder}}; namespace prj\{{.Root}}\controllers\{{.Subfolder}};
use \bs_tts\use_iol as IOL;
class {{.File}}_ctrl { class {{.File}}_ctrl {
public $page_output; public $page_output;
public function __construct() {
\tts\main\registry::set('db', \tts\main\registry::get('di')->get_service('db_mocker') );
}
public function {{.Method}}() { public function {{.Method}}() {
$input = \prj\{{.Root}}\inputs\{{.Subfolder}}\{{.File}}_in::{{.Method}}();
\prj\{{.Root}}\logic\{{.Subfolder}}\{{.File}}_logic::{{.Method}}($input);
$output = \prj\{{.Root}}\outputs\{{.Subfolder}}\{{.File}}_out::{{.Method}}($input);
$html = new \tts\html_document(); $html = new \tts\html_document();
$view = new \tts\view(); $view = new \tts\view();
$view->set('html', $html); $view->set('html', $html);
$view->set('output', $output); $view->set('output', IOL::auto_wire("{{.Subfolder}}", "{{.File}}", "{{.Method}}"));
$view->set_template('main'); $view->set_template('main');
$view->include("{{.Subfolder}}/{{.File}}_{{.Method}}_view"); $view->include("{{.Subfolder}}/{{.File}}_{{.Method}}_view");
$view->render($this); $view->render($this);

@ -4,11 +4,11 @@ declare(strict_types=1);
namespace prj\{{.Root}}\inputs\{{.Subfolder}}; namespace prj\{{.Root}}\inputs\{{.Subfolder}};
use \tts\INPUTS; use \bs_tts\INPUTS;
use \tts\FIELD_FILTER; use \bs_tts\FIELD_FILTER;
use \tts\HTML_FLAG; use \bs_tts\HTML_FLAG;
use \tts\DB_FILTER; use \bs_tts\DB_FILTER;
use \tts\use_io as IO; use \bs_tts\use_io as IO;
class {{.File}}_in { class {{.File}}_in {
@ -21,7 +21,7 @@ class {{.File}}_in {
*/ */
public static function {{.Method}}(): array { public static function {{.Method}}(): array {
\tts\safer_io::init_json(); // Staticly set JSON data if any \bs_tts\safer_io::init_json(); // Staticly set JSON data if any
$required_post_string_field = new IO(); $required_post_string_field = new IO();
$required_post_string_field->input_type = INPUTS::post; $required_post_string_field->input_type = INPUTS::post;

@ -4,12 +4,12 @@ declare(strict_types=1);
namespace prj\{{.Root}}\logic\{{.Subfolder}}; namespace prj\{{.Root}}\logic\{{.Subfolder}};
use \tts\safer_io as SafeIO; use \bs_tts\safer_io as SafeIO;
class {{.File}}_logic { class {{.File}}_logic {
public static function {{.Method}}(array & $input): void { public static function {{.Method}}(array & $input): void {
$model = new \prj\{{.Root}}\models\{{.Subfolder}}\{{.File}}_model(\tts\main\registry::get('db')); $model = new \prj\{{.Root}}\models\{{.Subfolder}}\{{.File}}_model(\main_tts\registry::get('db'));
$submitted = true; $submitted = true;
foreach(SafeIO::logic_sanitize($input) as $data) { foreach(SafeIO::logic_sanitize($input) as $data) {

@ -4,7 +4,7 @@ declare(strict_types=1);
namespace prj\{{.Root}}\outputs\{{.Subfolder}}; namespace prj\{{.Root}}\outputs\{{.Subfolder}};
use \tts\safer_io as SafeIO; use \bs_tts\safer_io as SafeIO;
class {{.File}}_out { class {{.File}}_out {
@ -21,7 +21,7 @@ class {{.File}}_out {
$key = $html['name'] ?? ""; $key = $html['name'] ?? "";
$html_output[$key] = $html['html']; $html_output[$key] = $html['html'];
if (\tts\common::get_count($html['errors'])) { if (\bs_tts\common::get_count($html['errors'])) {
$errors[$key] = $html['errors'][$key]; $errors[$key] = $html['errors'][$key];
} }
} }
@ -30,7 +30,7 @@ class {{.File}}_out {
$first_name = $html_output['first_name'] ?? "Unknown"; $first_name = $html_output['first_name'] ?? "Unknown";
$last_name = $html_output['last_name'] ?? "Unknown"; $last_name = $html_output['last_name'] ?? "Unknown";
$ret['main'] = (\tts\common::get_count($errors)) ? "" : "Hello, {$first_name} {$last_name}." . PHP_EOL; $ret['main'] = (\bs_tts\common::get_count($errors)) ? "" : "Hello, {$first_name} {$last_name}." . PHP_EOL;
$ret['errors'] = $errors; $ret['errors'] = $errors;
} else { } else {
$ret['main'] = "Welcome"; $ret['main'] = "Welcome";

@ -4,11 +4,11 @@ declare(strict_types=1);
namespace prj\mockup\inputs\app; namespace prj\mockup\inputs\app;
use \tts\INPUTS; use \bs_tts\INPUTS;
use \tts\FIELD_FILTER; use \bs_tts\FIELD_FILTER;
use \tts\HTML_FLAG; use \bs_tts\HTML_FLAG;
use \tts\DB_FILTER; use \bs_tts\DB_FILTER;
use \tts\use_io as IO; use \bs_tts\use_io as IO;
class home_in { class home_in {
@ -21,7 +21,7 @@ class home_in {
*/ */
public static function name_demo(): array { public static function name_demo(): array {
\tts\safer_io::init_json(); // Staticly set JSON data if any \bs_tts\safer_io::init_json(); // Staticly set JSON data if any
$required_post_string_field = new IO(); $required_post_string_field = new IO();
$required_post_string_field->input_type = INPUTS::post; $required_post_string_field->input_type = INPUTS::post;

@ -4,12 +4,12 @@ declare(strict_types=1);
namespace prj\mockup\logic\app; namespace prj\mockup\logic\app;
use \tts\safer_io as SafeIO; use \bs_tts\safer_io as SafeIO;
class home_logic { class home_logic {
public static function name_demo(array & $input): void { public static function name_demo(array & $input): void {
$model = new \prj\mockup\models\app\home_model(\tts\main\registry::get('db')); $model = new \prj\mockup\models\app\home_model(\main_tts\registry::get('db'));
$submitted = true; $submitted = true;
foreach(SafeIO::logic_sanitize($input) as $data) { foreach(SafeIO::logic_sanitize($input) as $data) {

@ -4,7 +4,7 @@ declare(strict_types=1);
namespace prj\mockup\outputs\app; namespace prj\mockup\outputs\app;
use \tts\safer_io as SafeIO; use \bs_tts\safer_io as SafeIO;
class home_out { class home_out {
@ -21,7 +21,7 @@ class home_out {
$key = $html['name'] ?? ""; $key = $html['name'] ?? "";
$html_output[$key] = $html['html']; $html_output[$key] = $html['html'];
if (\tts\common::get_count($html['errors'])) { if (\bs_tts\common::get_count($html['errors'])) {
$errors[$key] = $html['errors'][$key]; $errors[$key] = $html['errors'][$key];
} }
} }
@ -30,7 +30,7 @@ class home_out {
$first_name = $html_output['first_name'] ?? "Unknown"; $first_name = $html_output['first_name'] ?? "Unknown";
$last_name = $html_output['last_name'] ?? "Unknown"; $last_name = $html_output['last_name'] ?? "Unknown";
$ret['main'] = (\tts\common::get_count($errors)) ? "" : "Hello, {$first_name} {$last_name}, you are {$age} years old!" . PHP_EOL; $ret['main'] = (\bs_tts\common::get_count($errors)) ? "" : "Hello, {$first_name} {$last_name}, you are {$age} years old!" . PHP_EOL;
$ret['errors'] = $errors; $ret['errors'] = $errors;
} else { } else {
$ret['main'] = "Welcome"; $ret['main'] = "Welcome";

@ -24,10 +24,10 @@ class notices_out {
} }
public static function gen_pdf_for_late_payment(string $html_code): void { public static function gen_pdf_for_late_payment(string $html_code): void {
$style_sheet = file_get_contents(\tts\site_helper::get_root() . \tts\site_helper::get_project() . 'views/default/bills/notice_of_late_payment_css.php'); $style_sheet = file_get_contents(\bs_tts\site_helper::get_root() . \bs_tts\site_helper::get_project() . 'views/default/bills/notice_of_late_payment_css.php');
require_once TTS_VENDOR . 'autoload.php'; require_once TTS_VENDOR . 'autoload.php';
$mpdf = new \Mpdf\Mpdf(['tempDir' => \tts\site_helper::get_root() . '/tmp/mpdf']); // chown www-data, chmod 775 $mpdf = new \Mpdf\Mpdf(['tempDir' => \bs_tts\site_helper::get_root() . '/tmp/mpdf']); // chown www-data, chmod 775
$mpdf->AddFontDirectory(PROJECT_ASSETS_DIR . '/fonts'); $mpdf->AddFontDirectory(PROJECT_ASSETS_DIR . '/fonts');
$mpdf->fontdata['jennasue'] = ['R'=>"JennaSue.ttf"]; $mpdf->fontdata['jennasue'] = ['R'=>"JennaSue.ttf"];

@ -7,12 +7,12 @@ declare(strict_types=1);
/* Contents of : on_html_filter.php */ /* Contents of : on_html_filter.php */
\tts\main\registry::get('di')->register('html_filter', function() { \main_tts\registry::get('di')->register('html_filter', function() {
return new \tts\services\html_filter(); return new \tts\services\html_filter();
}); });
/* Contents of : on_log.php */ /* Contents of : on_log.php */
\tts\main\registry::get('di')->register('log', function(array $arg) { \main_tts\registry::get('di')->register('log', function(array $arg) {
$file_name = null; $file_name = null;
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename $file_name = $arg[0]; // filename
@ -31,7 +31,7 @@ declare(strict_types=1);
}); });
/* Contents of : on_templates.php */ /* Contents of : on_templates.php */
\tts\main\registry::get('di')->register('templates', function(array $arg) { \main_tts\registry::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl'; $file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0]; $file_type = $arg[0];
@ -40,7 +40,7 @@ declare(strict_types=1);
}); });
/* Contents of : on_test_db.php */ /* Contents of : on_test_db.php */
\tts\main\registry::get('di')->register('db_mocker', function($args) { \main_tts\registry::get('di')->register('db_mocker', function($args) {
try { try {
$conn = new \PDO('sqlite::memory:'); $conn = new \PDO('sqlite::memory:');
// set the PDO error mode to exception // set the PDO error mode to exception

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('html_filter', function() { \main_tts\registry::get('di')->register('html_filter', function() {
return new \tts\services\html_filter(); return new \tts\services\html_filter();
}); });

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('log', function(array $arg) { \main_tts\registry::get('di')->register('log', function(array $arg) {
$file_name = null; $file_name = null;
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename $file_name = $arg[0]; // filename

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('templates', function(array $arg) { \main_tts\registry::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl'; $file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0]; $file_type = $arg[0];

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('db_mocker', function($args) { \main_tts\registry::get('di')->register('db_mocker', function($args) {
try { try {
$conn = new \PDO('sqlite::memory:'); $conn = new \PDO('sqlite::memory:');
// set the PDO error mode to exception // set the PDO error mode to exception

@ -2,15 +2,15 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('cache', function(array $args) { \main_tts\registry::get('di')->register('cache', function(array $args) {
$servers = \tts\main\configure::get('cache', 'servers'); $servers = \main_tts\configure::get('cache', 'servers');
if (isset($args[0])) { if (isset($args[0])) {
$db_no = $args[0]; $db_no = $args[0];
} else { } else {
\tts\main\configure::get('cache', 'selected_db_no'); \main_tts\configure::get('cache', 'selected_db_no');
} }
$auth = \tts\main\configure::get('cache', 'auth_password'); $auth = \main_tts\configure::get('cache', 'auth_password');
return new \tts\services\cache\redis_db($servers, $db_no, $auth); return new \tts\services\cache\redis_db($servers, $db_no, $auth);
}); });

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('db_mocker', function($args) { \main_tts\registry::get('di')->register('db_mocker', function($args) {
try { try {
return new PDO('sqlite::memory:'); return new PDO('sqlite::memory:');
} catch (PDOException $e) { } catch (PDOException $e) {

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('crypto', function($nonce) { \main_tts\registry::get('di')->register('crypto', function($nonce) {
return new \tts\services\crypto($nonce); return new \tts\services\crypto($nonce);
}); });

@ -2,30 +2,30 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('db', function(array $args) { \main_tts\registry::get('di')->register('db', function(array $args) {
if (isset($args[0])) { if (isset($args[0])) {
$db_select = $args[0]; $db_select = $args[0];
} else { } else {
$db_select = 'database'; $db_select = 'database';
} }
$error_mode = \tts\main\configure::get('database', 'PDO_ERROR'); $error_mode = \main_tts\configure::get('database', 'PDO_ERROR');
if ($error_mode === null) { if ($error_mode === null) {
$error_mode = PDO::ERRMODE_EXCEPTION; $error_mode = PDO::ERRMODE_EXCEPTION;
} }
$options = array( $options = array(
PDO::ATTR_PERSISTENT => \tts\main\configure::get('database', 'PDO_PERSISTENT'), PDO::ATTR_PERSISTENT => \main_tts\configure::get('database', 'PDO_PERSISTENT'),
PDO::ATTR_ERRMODE => $error_mode, PDO::ATTR_ERRMODE => $error_mode,
PDO::ATTR_TIMEOUT => \tts\main\configure::get('database', 'PDO_TIMEOUT'), PDO::ATTR_TIMEOUT => \main_tts\configure::get('database', 'PDO_TIMEOUT'),
); );
$db_info = \tts\main\configure::get($db_select); $db_info = \main_tts\configure::get($db_select);
\tts\main\configure::wipe($db_select); \main_tts\configure::wipe($db_select);
$db_socket = (isset($db_info['SOCKET'])) ? $db_info['SOCKET'] : false; $db_socket = (isset($db_info['SOCKET'])) ? $db_info['SOCKET'] : false;
try { try {
$pdo_set_time = \tts\common::get_bool(\tts\main\configure::get('database', 'PDO_SET_TIME')); $pdo_set_time = \bs_tts\common::get_bool(\main_tts\configure::get('database', 'PDO_SET_TIME'));
} catch (\tts\exceptions\Bool_Exception $e) { } catch (\tts\exceptions\Bool_Exception $e) {
echo $e->errorMessage(); echo $e->errorMessage();
} }
@ -37,7 +37,7 @@ declare(strict_types=1);
$dsn = $db_info['TYPE'] . ':host=' . $db_info['HOST'] . ';port=' . $db_info['PORT'] . ';dbname=' . $db_info['NAME']; $dsn = $db_info['TYPE'] . ':host=' . $db_info['HOST'] . ';port=' . $db_info['PORT'] . ';dbname=' . $db_info['NAME'];
} }
$pdo = new PDO($dsn, $db_info['USER'], $db_info['PASS'], $options); $pdo = new PDO($dsn, $db_info['USER'], $db_info['PASS'], $options);
\tts\common::wipe($dsn); \bs_tts\common::wipe($dsn);
if ($pdo_set_time === true) { if ($pdo_set_time === true) {
$pdo->query("SET NAMES 'utf8';"); $pdo->query("SET NAMES 'utf8';");

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('debugger', function($o) { \main_tts\registry::get('di')->register('debugger', function($o) {
return \tts\services\debugger::error($o); return \tts\services\debugger::error($o);
}); });

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('emailer', function() { \main_tts\registry::get('di')->register('emailer', function() {
return new \tts\services\emailer(); return new \tts\services\emailer();
}); });

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('encryption', function() { \main_tts\registry::get('di')->register('encryption', function() {
return new \tts\services\encryption(); return new \tts\services\encryption();
}); });

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('html_filter', function() { \main_tts\registry::get('di')->register('html_filter', function() {
return new \tts\services\html_filter(); return new \tts\services\html_filter();
}); });

@ -2,8 +2,8 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('http_request', function() { \main_tts\registry::get('di')->register('http_request', function() {
if (\tts\main\configure::get('http_request', 'use') == 'curl') { if (\main_tts\configure::get('http_request', 'use') == 'curl') {
return new \tts\services\http_requests\http_curl_request(); return new \tts\services\http_requests\http_curl_request();
} else { } else {
return new \tts\services\http_requests\http_socket_request(); return new \tts\services\http_requests\http_socket_request();

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('log', function(array $arg) { \main_tts\registry::get('di')->register('log', function(array $arg) {
$file_name = null; $file_name = null;
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename $file_name = $arg[0]; // filename

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('passwords', function() { \main_tts\registry::get('di')->register('passwords', function() {
return new \tts\services\passwords(); return new \tts\services\passwords();
}); });

@ -2,11 +2,11 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('session', function(array $args) { \main_tts\registry::get('di')->register('session', function(array $args) {
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$type = $arg[0]; $type = $arg[0];
} else { } else {
$type = \tts\main\configure::get('sessions', 'type'); $type = \main_tts\configure::get('sessions', 'type');
} }
return new \tts\services\sessions($type); return new \tts\services\sessions($type);
}); });

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('templates', function(array $arg) { \main_tts\registry::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl'; $file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0]; $file_type = $arg[0];

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('twillio', function() { \main_tts\registry::get('di')->register('twillio', function() {
return new \tts\services\twillio(); return new \tts\services\twillio();
}); });

@ -7,12 +7,12 @@ declare(strict_types=1);
/* Contents of : on_html_filter.php */ /* Contents of : on_html_filter.php */
\tts\main\registry::get('di')->register('html_filter', function() { \main_tts\registry::get('di')->register('html_filter', function() {
return new \tts\services\html_filter(); return new \tts\services\html_filter();
}); });
/* Contents of : on_log.php */ /* Contents of : on_log.php */
\tts\main\registry::get('di')->register('log', function(array $arg) { \main_tts\registry::get('di')->register('log', function(array $arg) {
$file_name = null; $file_name = null;
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename $file_name = $arg[0]; // filename
@ -31,7 +31,7 @@ declare(strict_types=1);
}); });
/* Contents of : on_templates.php */ /* Contents of : on_templates.php */
\tts\main\registry::get('di')->register('templates', function(array $arg) { \main_tts\registry::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl'; $file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0]; $file_type = $arg[0];
@ -40,7 +40,7 @@ declare(strict_types=1);
}); });
/* Contents of : on_test_db.php */ /* Contents of : on_test_db.php */
\tts\main\registry::get('di')->register('db_mocker', function($args) { \main_tts\registry::get('di')->register('db_mocker', function($args) {
try { try {
$conn = new \PDO('sqlite::memory:'); $conn = new \PDO('sqlite::memory:');
// set the PDO error mode to exception // set the PDO error mode to exception

@ -2,6 +2,6 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('html_filter', function() { \main_tts\registry::get('di')->register('html_filter', function() {
return new \tts\services\html_filter(); return new \tts\services\html_filter();
}); });

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('log', function(array $arg) { \main_tts\registry::get('di')->register('log', function(array $arg) {
$file_name = null; $file_name = null;
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename $file_name = $arg[0]; // filename

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('templates', function(array $arg) { \main_tts\registry::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl'; $file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) { if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0]; $file_type = $arg[0];

@ -2,7 +2,7 @@
declare(strict_types=1); declare(strict_types=1);
\tts\main\registry::get('di')->register('db_mocker', function($args) { \main_tts\registry::get('di')->register('db_mocker', function($args) {
try { try {
$conn = new \PDO('sqlite::memory:'); $conn = new \PDO('sqlite::memory:');
// set the PDO error mode to exception // set the PDO error mode to exception

Loading…
Cancel
Save