https://github.com/chareka-legacy/hyper
https://github.com/chareka-legacy/hyper
fast framework hyper mvc php php-mvc php-query-builder php-routing twig-templates
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chareka-legacy/hyper
- Owner: chareka-legacy
- License: mit
- Created: 2019-11-12T12:01:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-11T18:36:54.000Z (over 1 year ago)
- Last Synced: 2025-07-02T04:35:04.391Z (9 months ago)
- Topics: fast, framework, hyper, mvc, php, php-mvc, php-query-builder, php-routing, twig-templates
- Language: PHP
- Size: 709 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# Hyper Documentation v1.0.12
--
## Getting started
## TODOs
- Secure `web.json`
#### Create new Hyper app: index.php
###### Import ``HyperApp`` class:
```php
use Hyper\Application\HyperApp;
```
###### Import hyper file to enable most functions using ``require``
```php
require 'hyper/index.php';
```
###### Create and run the application
```php
new HyperApp("", "auto");
```
###### Run app with custom sections
```php
$customSections = ["hello-section"];
new HyperApp("", "auto", $customSections);
```
###### Run app with manual routing
```php
//TODO: work on manual routing
```
###### Complete index.php
```php
use Hyper\Application\HyperApp;
require 'Hyper/Index.php';
new HyperApp("", "auto");
```
###### Usage:
```html
//Put section where you want it to be rendered. Usually layout.php
//Put section content from other views
```
##### Config
Hyper configurations are stored in ``web.json`` or your own ``JSON`` file
###### Database connection
To configure a database, add a ``db`` object in the config file ``web.json``
For example:
```json
{
"db": {
"host": "localhost",
"port": 80,
"database": "",
"username": "root",
"password": ""
}
}
```
###### Debug
To turn on/off debug mode set ``debug`` property to ``json``
For example:
```json
{
"debug": true
}
```
###### Custom error pages