Robert 3 years ago
parent 92ca57d644
commit 53d97e35d2
  1. 3
      composer.json
  2. 7
      documents/Purifier.txt
  3. 6
      src/bootstrap/common.php
  4. 6
      src/bootstrap/errors.php
  5. 6
      src/bootstrap/requires.php
  6. 6
      src/bootstrap/safer_io.php
  7. 6
      src/bootstrap/site_helper.php
  8. 6
      src/classes/api.php
  9. 6
      src/classes/app.php
  10. 6
      src/classes/assets.php
  11. 6
      src/classes/console_app.php
  12. 6
      src/classes/database/dummy_data.php
  13. 6
      src/classes/database/help_save.php
  14. 6
      src/classes/html.php
  15. 6
      src/classes/html_document.php
  16. 6
      src/classes/json.php
  17. 6
      src/classes/loadall.php
  18. 10
      src/classes/memory_usage.php
  19. 6
      src/classes/page_not_found.php
  20. 6
      src/classes/request.php
  21. 2
      src/classes/router.php
  22. 6
      src/classes/safer_sql.php
  23. 6
      src/classes/security.php
  24. 6
      src/classes/services/cache/file.php
  25. 6
      src/classes/services/cache/redis_db.php
  26. 6
      src/classes/services/emailer.php
  27. 6
      src/classes/services/http_requests/http_curl_request.php
  28. 6
      src/classes/services/log.php
  29. 0
      src/classes/services/obsolete/.htaccess
  30. 6
      src/classes/services/sessions.php
  31. 6
      src/classes/services/sessions/file_sessions.php
  32. 6
      src/classes/services/sessions/redis_sessions.php
  33. 6
      src/classes/session_management.php
  34. 6
      src/classes/tag_matches.php
  35. 6
      src/classes/time_zones.php
  36. 6
      src/classes/traits/database/validation.php
  37. 7
      src/classes/view.php
  38. 22
      src/main.inc.php
  39. 6
      src/views/404.php
  40. 7
      src/views/errors.php

@ -9,7 +9,8 @@
{
"name": "Robert Strutts",
"email": "Robert@TryingToScale.com",
"homepage": "https://TryingToScale.com"
"homepage": "https://TryingToScale.com",
"role": "Developer"
}
],
"require": {

@ -0,0 +1,7 @@
The HTML Purifier Cache folder needs write access for web server:
cd /var/www/frames/tts_framework/vendor/ezyang/htmlpurifier/library
chgrp www-data HTMLPurifier/DefinitionCache/Serializer
Make sure that group has read/write/execute access via:
chmod g+rwx HTMLPurifier/DefinitionCache/Serializer

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace bs_tts;
final class common {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
define('WORD_WRAP_CHRS', 80); // Letters before Line Wrap on Errors
$root = \bs_tts\site_helper::get_root();
if (!defined('TTS_PROJECT_LOGS_DIR')) {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace bs_tts;
final class requires {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
/* Sanitize Input, Validate data and Escape output.
* 1) In web development to sanitize means that you remove unsafe
* characters from the input. Makes safer DB inserts/selects, etc...!

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace bs_tts;
final class site_helper {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
class api {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
use Exception;

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class assets {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class console_app {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\database;
final class dummy_data {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\database;
use \bs_tts\safer_io as SafeIO;

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class html {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
/**

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class json {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class loadall {

@ -2,12 +2,18 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class memory_usage {
/**
* Used by get_memory_stats to get approperate units of bytes
/**
* Used by get_memory_stats to get appropriate units of bytes
* @param type $size in bytes
* @retval string of unit size for bytes
*/

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
class page_not_found {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class request {

@ -90,7 +90,7 @@ class router
}
/**
* Asign name to route
* Assign name to route
*
* @param $name
*/

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
/**
* @todo This is just for PLAY for now!!!!
* Too many FALSE positives and too many FALSE Negatives!!!

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class security {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services\cache;
class file {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services\cache;
final class redis_db {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services;
class emailer {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services\http_requests;
class http_curl_request {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services;
final class log {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services;
class sessions {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services\sessions;
class file_sessions implements \tts\contracts\sessions_interface {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\services\sessions;
class redis_sessions implements \tts\contracts\sessions_interface {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class session_management {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class tag_matches {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class time_zones {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts\traits\database;
trait validation {

@ -2,6 +2,13 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace tts;
final class view {

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
namespace main_tts;
unset($_REQUEST); // Request is dangerious
@ -182,15 +188,15 @@ final class di {
}
public function resolve(string $service_name) {
//try {
try {
$reflection_class = new \ReflectionClass($service_name);
//} catch (\ReflectionException $e) {
/*
var_dump($e->getTrace());
echo $e->getMessage();
exit;
*/
//}
} catch (\ReflectionException $e) {
if (! \main_tts\configure::set('tts', 'live')) {
var_dump($e->getTrace());
echo $e->getMessage();
exit;
}
}
if (! $reflection_class->isInstantiable()) {
throw new \Exception("The Service class: {$service_name} is not instantiable.");
}

@ -2,6 +2,12 @@
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
$protocol = "HTTP/1.0";
if ( "HTTP/1.1" == $_SERVER["SERVER_PROTOCOL"] ) {
$protocol = "HTTP/1.1";

@ -1,6 +1,13 @@
<?php
declare(strict_types=1);
/**
* @author Robert Strutts <Robert@TryingToScale.com>
* @copyright Copyright (c) 2022, Robert Strutts.
* @license https://mit-license.org/
*/
define('PRODUCTION', 600);
define('MAINTENACE', 3600); // 1 hour = 3600 seconds
define('RETRY_AFTER', PRODUCTION);

Loading…
Cancel
Save