Skip to content

Commit

Permalink
New update and changes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterujah committed Feb 23, 2024
1 parent 3389787 commit 50d8b59
Show file tree
Hide file tree
Showing 43 changed files with 2,550 additions and 327 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ script.ignore.abort = 1
script.ob.handler = ob_gzhandler
compression.level = 6

# DEBUGGING
show.debug.tracer = 0

# EMAIL AND SMTP SETTING

smtp.use.credentials = 0
Expand Down
69 changes: 69 additions & 0 deletions app/Controllers/Config/Cookie.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php
/**
* Luminova Framework
*
* @package Luminova
* @author Ujah Chigozie Peter
* @copyright (c) Nanoblock Technology Ltd
* @license See LICENSE file
*/

namespace App\Controllers\Config;

class Cookie
{
/**
* The path where session files are stored on the server.
* @var string $savePath;
*/
public string $savePath = "";

/**
* The lifetime of the session in seconds.
* @var int $expiration;
*/
public int $expiration = 365 * 24 * 60 * 60;

/**
* The path to use for the session cookie.
* @var string $sessionPath;
*/
public string $cookiePath = "/";

/**
* The domain to use for the session cookie.
* @var string $sessionDomain;
*/
public string $cookieDomain = ".localhost";

/**
* Set the session cookie security level.
* None, Lax, Strict
* @var string $sameSite;
*/
public string $sameSite = "Lax";

/**
*
* Cookie will only be set if a secure HTTPS connection exists.
*/
public bool $secure = false;

/**
*
* Cookie will only be accessible via HTTP(S) (no JavaScript).
*/
public bool $httpOnly = true;

/**
* This flag allows setting a "raw" cookie, i.e., its name and value are
* not URL encoded using `rawurlencode()`.
*
* If this is set to `true`, cookie names should be compliant of RFC 2616's
* list of allowed characters.
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes
* @see https://tools.ietf.org/html/rfc2616#section-2.2
*/
public bool $cookieRaw = false;
}
7 changes: 4 additions & 3 deletions app/Controllers/Config/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@

namespace App\Controllers\Config;

class Session {
class Session
{
/**
* The name of the session cookie.
* @var string $cookieName;
*/
public string $cookieName = "PHPSESSID";
public string $cookieName = "ESANSESSID";

/**
* The path where session files are stored on the server.
Expand Down Expand Up @@ -43,7 +44,7 @@ class Session {

/**
* Set the session cookie security level.
* None, Lax, Strict
* None, Lax, Strict
* @var string $sameSite;
*/
public string $sameSite = "Lax";
Expand Down
8 changes: 0 additions & 8 deletions app/Controllers/Global.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Controllers/Utils/Func.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @copyright (c) Nanoblock Technology Ltd
* @license See LICENSE file
*/
namespace App\Controllers;
namespace App\Controllers\Utils;

use \Luminova\Base\BaseFunction;

Expand Down
2 changes: 0 additions & 2 deletions bootstrap/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/

require_once __DIR__ . '/../system/plugins/autoload.php';
error_reporting(E_ALL);
ini_set('display_errors', '1');
$minPhpVersion = '8.0';
if (version_compare(PHP_VERSION, $minPhpVersion, '<')) {
$message = sprintf(
Expand Down
7 changes: 0 additions & 7 deletions bootstrap/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@
*/
register_shutdown_function(['\Luminova\Errors\Error', 'shutdown']);

/*
* Require system Common.php
*/
if (!defined('APP_COMMON')) {
include_once __DIR__ . '/../system/Functions/Common.php';
}

/*
* Require application Global.php file if exists.
*/
Expand Down
15 changes: 15 additions & 0 deletions class.config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Luminova Framework
*
* @package Luminova
* @author Ujah Chigozie Peter
* @copyright (c) Nanoblock Technology Ltd
* @license See LICENSE file
*/

return [
'aliases' => [
//'FooAlias' => 'SomeLiterary\Foo',
]
];
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"php": "^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"ext-intl": "*",
"psr/log": "^1.1"
},
"require-dev": {
Expand All @@ -30,9 +31,16 @@
"ext-imagick": "Needed if you use Image class ImageMagickHandler",
"ext-memcache": "Needed if you use Cache class MemcachedHandler with Memcache",
"ext-memcached": "Needed if you use Cache class MemcachedHandler with Memcached",
"ext-mysqli": "Needed if you use MySQL"
"ext-mysqli": "Needed if you use MySQL",
"ext-intl": "Needed if you use Local",
"phpmailer/phpmailer": "Needed if you use Mailer",
"smarty/smarty": "Needed if you use Template engine"
},
"autoload": {
"files": [
"libraries/sys/functions.php",
"libraries/sys/helpers.php"
],
"psr-4": {
"Luminova\\": "system/",
"App\\Controllers\\": "app/Controllers/"
Expand Down
Empty file added libraries/libs/.gitkeep
Empty file.
Loading

0 comments on commit 50d8b59

Please sign in to comment.