Download the PHP package naqla-sehia/naqla-framework without Composer
On this page you can find all versions of the php package naqla-sehia/naqla-framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download naqla-sehia/naqla-framework
More information about naqla-sehia/naqla-framework
Files in naqla-sehia/naqla-framework
Package naqla-framework
Short Description A micro framework used by Naqla Sehia development team for PHP Back-end projects
License MIT
Informations about the package naqla-framework
Naqla Sehia PHP Micro Framework
A lightweight, modern PHP micro-framework designed for building web applications with clean architecture and minimal overhead.
Features
- Modern PHP 8.0+ with typed properties and return types
- Routing - Simple and clean route definition with GET/POST methods
- Request/Response - Elegant HTTP request and response handling
- Validation - Built-in validation system with extensible rules
- Database Abstraction - Support for MySQL and SQLite with query builder
- Session Management - Flash message support and session handling
- View Rendering - Template support with layout inheritance
- Helper Functions - Convenient global helper functions
- Configuration Management - Environment-based configuration system
- PDO-based Database - Safe prepared statement execution
- Error Handling - Proper exception handling and HTTP status codes
Installation
Install via Composer:
Quick Start
Project Structure
Your project should follow this structure:
Setup .env
Create a .env file in your project root:
Create Entry Point (public/index.php)
Define Routes (routes/web.php)
Create a Controller
Core Components
Request
Handle incoming HTTP requests:
Response
Control outgoing HTTP responses:
Database
Work with MySQL and SQLite:
Validation
Validate input data:
Available Rules:
required- Field is requiredemail- Valid email formatalnum- Alphanumeric characters onlybetween:min,max- String length between min and maxmax:length- Maximum string lengthconfirmed- Field value matches field_confirmationunique:table,column- Value is unique in table
View
Render views with template inheritance:
Layout (views/layouts/main.php):
View (views/dashboard.php):
Session
Manage user sessions:
Configuration
Access configuration values:
Helper Functions
Convenient global functions:
Built-in Support Classes
Arr (Array Helper)
Str (String Helper)
Hash (Security Helper)
Error Handling
The framework automatically handles errors:
Database Configuration
MySQL (config/database.php)
SQLite (config/database.php)
Extending the Framework
Create Custom Validation Rules
Then register in RulesMapper:
Best Practices
- Use Type Hints - Always type hint properties and parameters
- Validate Input - Always validate user input before processing
- Use Prepared Statements - The framework uses PDO prepared statements
- Environment Configuration - Keep sensitive data in .env files
- Separate Concerns - Keep controllers thin, logic in services
- Use Helper Functions - They provide a clean, fluent API
- Handle Errors Gracefully - Return appropriate HTTP status codes
- Use Sessions - Store user state securely in sessions
Requirements
- PHP 8.0 or higher
- PDO extension
- OpenSSL extension (for password hashing)
Dependencies
phpmailer/phpmailer- Email handlingsymfony/var-dumper- Debugging utilitiesvlucas/phpdotenv- Environment variable loading
License
MIT License - Free to use in commercial and private projects.
Support
For issues, questions, or contributions, please visit the project repository.
Developed By
Fares Khalid - Software Engineer
Inspired by: SecTheater YouTube Channel Tutorial
Get started building amazing web applications with Naqla Sehia Framework today!
All versions of naqla-framework with dependencies
phpmailer/phpmailer Version ^6.5
symfony/var-dumper Version ^5.2
vlucas/phpdotenv Version ^5.3