Skip to content

feat: Update configuration and file handling #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2023
Merged

feat: Update configuration and file handling #13

merged 1 commit into from
Dec 10, 2023

Conversation

dconco
Copy link
Owner

@dconco dconco commented Dec 10, 2023

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

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
@dconco dconco merged commit e84d4a3 into master Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant