An open API service indexing awesome lists of open source software.

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

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)