Using the collapsed tts namespace as default.

main
Robert 3 years ago
parent e44e3a364d
commit 4f86a4a84b
  1. 11
      public/main.page
  2. 13
      src/before_main.php
  3. 15
      src/configs/mockup/loadall.php
  4. 2
      src/configs/mockup/on_email.php
  5. 2
      src/configs/mockup/on_html.php
  6. 2
      src/configs/mockup/on_http_request.php
  7. 2
      src/configs/mockup/on_security.php
  8. 2
      src/configs/mockup/on_sessions.php
  9. 2
      src/configs/mockup/on_tts.php
  10. 2
      src/configs/mockup/on_view_mode.php
  11. 24
      src/main.php
  12. 2
      src/mockup/controllers/app/home_ctrl.php
  13. 11
      src/services/mockup/loadall.php
  14. 2
      src/services/mockup/on_html_filter.php
  15. 2
      src/services/mockup/on_log.php
  16. 2
      src/services/mockup/on_session_encryption.php
  17. 2
      src/services/mockup/on_templates.php
  18. 2
      src/services/mockup/on_test_db.php

@ -8,7 +8,7 @@ declare(strict_types=1);
* @license https://mit-license.org/
*/
$show_all_startup_errors = false; // Always, Keep false on LIVE PROD SYS!!
$show_all_startup_errors = true; // Always, Keep false on LIVE PROD SYS!!
if ($show_all_startup_errors) {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
@ -16,11 +16,14 @@ if ($show_all_startup_errors) {
}
require '../src/before_main.php';
\tts\site_helper::set_all_projects(['mockup','ex','live']);
\tts\site_helper::set_default_project("mockup");
$helper = (USE_COMPILED_FILE) ? 'tts' : 'bs_tts';
$site_helper = "\\$helper\\site_helper";
$site_helper::set_all_projects(['mockup','ex','live']);
$site_helper::set_default_project("mockup");
$PHPUNIT_Testing = false;
\tts\site_helper::init(PROJECT_BASE_DIR, $_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD'], $PHPUNIT_Testing);
$site_helper::init(PROJECT_BASE_DIR, $_SERVER['REQUEST_URI'], $_SERVER['REQUEST_METHOD'], $PHPUNIT_Testing);
require '../src/main.php';

@ -4,7 +4,16 @@ declare(strict_types=1);
const PROJECT_BASE_DIR = __DIR__ . '/';
const USE_COMPILED_FILE = true;
const FW_DIST = '/var/www/frames/tts_framework/src/dist';
require FW_DIST . '/tts.php';
//require '/var/www/frames/tts_framework/src/bootstrap/site_helper.php';
if (USE_COMPILED_FILE) {
if (! file_exists(FW_DIST . '/tts.php')) {
echo "Please compile the tts_framework!!";
exit(1);
}
require FW_DIST . '/tts.php';
} else {
require '/var/www/frames/tts_framework/src/bootstrap/site_helper.php';
}

@ -3,10 +3,11 @@
/*
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration!
*/
use \tts\configure as Config;
/* Contents of : on_email.php */
\tts\configure::set('email', array(
Config::set('email', array(
// 'host' => '', // SMTP Hosts - seperated by ;
// 'username' => '',
// 'password' => '',
@ -16,7 +17,7 @@
));
/* Contents of : on_html.php */
\tts\configure::set('html', array(
Config::set('html', array(
'title' => 'In Mockup...',
'author' => 'Robert Strutts',
'javascript' => array('js/tts.min.js'=>'assets'), //'js/analytics.js'=>'project'
@ -27,13 +28,13 @@
));
/* Contents of : on_http_request.php */
\tts\configure::set('http_request', array(
Config::set('http_request', array(
'use' => 'sockets', // curl or sockets
));
/* Contents of : on_security.php */
\tts\configure::set('security', array(
Config::set('security', array(
'show_dumps' => true,
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==',
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1',
@ -46,7 +47,7 @@
/* Contents of : on_sessions.php */
\tts\configure::set('sessions', array(
Config::set('sessions', array(
'type' => 'cookies', // Session Type: php, files, redis, or cookies
'session_variable' => 'ses_app_', // set session variable name for project
'session_name' => 'main_SESS', // More secure then PHPSESSID
@ -72,7 +73,7 @@
// \bs_tts\site_helper::set_allowed_Private_IPs(['192.168.32.2', '192.168.32.3']);
// \bs_tts\site_helper::set_allowed_Public_IPs('12.x.x.x');
\tts\configure::set('tts', array(
Config::set('tts', array(
'site_name' => 'Testing',
'short_url' => true,
'default_project' => 'home',
@ -81,6 +82,6 @@
));
/* Contents of : on_view_mode.php */
\tts\configure::set('view_mode', array(
Config::set('view_mode', array(
'default_paths' => array('json', 'common', 'flexbox', 'default')
));

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

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

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

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

@ -1,6 +1,6 @@
<?php
\tts\configure::set('sessions', array(
Config::set('sessions', array(
'type' => 'cookies', // Session Type: php, files, redis, or cookies
'session_variable' => 'ses_app_', // set session variable name for project
'session_name' => 'main_SESS', // More secure then PHPSESSID

@ -16,7 +16,7 @@
// \bs_tts\site_helper::set_allowed_Private_IPs(['192.168.32.2', '192.168.32.3']);
// \bs_tts\site_helper::set_allowed_Public_IPs('12.x.x.x');
\tts\configure::set('tts', array(
Config::set('tts', array(
'site_name' => 'Testing',
'short_url' => true,
'default_project' => 'home',

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

@ -1,15 +1,17 @@
<?php
\tts\site_helper::set_fw_dist(FW_DIST);
\tts\set_ns();
/*
declare(strict_types=1);
require '/var/www/frames/tts_framework/src/main.inc.php';
$purifier = '/var/www/frames/tts_framework/src/bootstrap/html_purifier.php';
if (file_exists($purifier)) {
include $purifier;
if (USE_COMPILED_FILE) {
\tts\site_helper::set_fw_dist(FW_DIST);
\tts\set_ns();
} else {
require '/var/www/frames/tts_framework/src/main.inc.php';
\bs_tts\site_helper::set_fw_dist(FW_DIST);
\main_tts\set_ns();
$purifier = '/var/www/frames/tts_framework/src/bootstrap/html_purifier.php';
if (file_exists($purifier)) {
include $purifier;
}
}
*/

@ -39,7 +39,7 @@ class home_ctrl {
}
public function opcache_check() {
\bs_tts\common::dump(opcache_get_status(true));
\tts\common::dump(opcache_get_status(true));
// print_r(realpath_cache_get());
}

@ -3,15 +3,16 @@
/*
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration!
*/
use \tts\registry as Reg;
/* Contents of : on_html_filter.php */
\tts\registry::get('di')->register('html_filter', function() {
Reg::get('di')->register('html_filter', function() {
return new \tts\html_filter();
});
/* Contents of : on_log.php */
\tts\registry::get('di')->register('log', function(array $arg) {
Reg::get('di')->register('log', function(array $arg) {
$file_name = null;
if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename
@ -30,7 +31,7 @@
});
/* Contents of : on_session_encryption.php */
\tts\registry::get('di')->register('session_encryption', function($args) {
Reg::get('di')->register('session_encryption', function($args) {
try {
return new \tts\sodium_storage(
\tts\configure::get('sessions', 'session_key')
@ -41,7 +42,7 @@
});
/* Contents of : on_templates.php */
\tts\registry::get('di')->register('templates', function(array $arg) {
Reg::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0];
@ -50,7 +51,7 @@
});
/* Contents of : on_test_db.php */
\tts\registry::get('di')->register('db_mocker', function($args) {
Reg::get('di')->register('db_mocker', function($args) {
try {
$conn = new \PDO('sqlite::memory:');
// set the PDO error mode to exception

@ -1,5 +1,5 @@
<?php
\tts\registry::get('di')->register('html_filter', function() {
Reg::get('di')->register('html_filter', function() {
return new \tts\html_filter();
});

@ -1,6 +1,6 @@
<?php
\tts\registry::get('di')->register('log', function(array $arg) {
Reg::get('di')->register('log', function(array $arg) {
$file_name = null;
if (isset($arg[0]) && is_string($arg[0])) {
$file_name = $arg[0]; // filename

@ -1,6 +1,6 @@
<?php
\tts\registry::get('di')->register('session_encryption', function($args) {
Reg::get('di')->register('session_encryption', function($args) {
try {
return new \tts\sodium_storage(
\tts\configure::get('sessions', 'session_key')

@ -1,6 +1,6 @@
<?php
\tts\registry::get('di')->register('templates', function(array $arg) {
Reg::get('di')->register('templates', function(array $arg) {
$file_type = '.tpl';
if (isset($arg[0]) && is_string($arg[0])) {
$file_type = $arg[0];

@ -1,6 +1,6 @@
<?php
\tts\registry::get('di')->register('db_mocker', function($args) {
Reg::get('di')->register('db_mocker', function($args) {
try {
$conn = new \PDO('sqlite::memory:');
// set the PDO error mode to exception

Loading…
Cancel
Save