Skip to content

Commit

Permalink
feat: Update configuration and file handling
Browse files Browse the repository at this point in the history
This commit updates the configuration settings in the .env file to use
consistent spacing and adds new environment variables for the default
host page. Additionally, it modifies the RouteController class to
improve file handling by using the file_get_contents function instead of
include, making it easier to manipulate content before output.

The commit also includes modifications to the Route class:
- It introduces a new static variable, $root_dir, to store the root
directory path.
- It adds a check for the presence of the 'fileinfo' extension and
throws an exception if it is not enabled.
- It refactors the file_type method to utilize the finfo_file function
instead of mime_content_type for improved performance.
- It updates the handling of file extensions for better content type
detection.
- It sets the $log and $root_dir variables within the class constructor
for consistency.

The commit also includes minor updates to other files, such as the
README.md and composer.json, correcting typos and improving clarity.

These changes enhance the configuration and file handling aspects of the
project, improving efficiency and providing more control over the
output. No issues are associated with this commit at this time.

References: None
  • Loading branch information
dconco committed Dec 10, 2023
1 parent dffa41d commit e443024
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
"./configs/env.config.php",
"./configs/cors.php"
],
"classmap": ["*"]
"classmap": [ "*" ]
},
"scripts": {
"slides-refresh": "composer dump-autoload",
"create-slides-app": "composer create-project dconco/php_slides"
},
"authors": [{
"name": "Dave Conco",
"email": "[email protected]"
}],
"authors": [ {
"name": "Dave Conco",
"email": "[email protected]"
} ],
"require": {
"php": "^8.3",
"php": "^8.0",
"firebase/php-jwt": "^6.9",
"vlucas/phpdotenv": "^5.5"
},
Expand Down

0 comments on commit e443024

Please sign in to comment.