https://github.com/the-eater/glim
Glamorous Slim php
https://github.com/the-eater/glim
Last synced: about 1 month ago
JSON representation
Glamorous Slim php
- Host: GitHub
- URL: https://github.com/the-eater/glim
- Owner: the-eater
- Created: 2016-03-30T17:54:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-30T19:17:14.000Z (over 10 years ago)
- Last Synced: 2026-01-18T22:29:56.536Z (5 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Glim
Adding more glamour to Slim
# What is it?
Glim HSVM model build around Slim, Propel and Twig.
# HSVM
I totally just made that up but it stands for **H**andler **S**ervice **V**iew **M**odel
## Handler
A handler is like a controller but only handles one request, every route has it's own handler.
An example handler would look like
```php
get('user');
$user = $user->login($this->post('username'), $this->post('password'));
if ($user === false) {
return "Login failed";
} else {
return "Welcome, {$user->name}";
}
}
}
```
## Service
A service is an class exposing several functions around a certain subject
for example here we have the user service
```php
name = "Towel";
return $user;
}
return false;
}
}
```
## View
The view, written in [twig](http://twig.sensiolabs.org)
## Model
The model, generated by [propel](http://propelorm.org)