forked from zer.ooo/web
update README + delete ignored files
This commit is contained in:
parent
fc0c618355
commit
c704ffcad7
13 changed files with 6 additions and 100 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -2,7 +2,7 @@ tmp
|
|||
vendor/*
|
||||
storage/*
|
||||
logs/*
|
||||
public/.sass-cache/*
|
||||
public/.sass-cache
|
||||
.idea
|
||||
.vagrant
|
||||
.DS_store
|
||||
.DS_Store
|
||||
|
|
102
README.md
102
README.md
|
@ -1,104 +1,10 @@
|
|||
# Glim
|
||||
# Zer.ooo
|
||||
|
||||
Adding more glamour to Slim
|
||||
The open-source OpenVPN manager.
|
||||
|
||||
# What is it?
|
||||
## 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
|
||||
<?php
|
||||
|
||||
namespace Eater\Glim\Handler;
|
||||
|
||||
class Login extends Main
|
||||
{
|
||||
function handle()
|
||||
{
|
||||
$user = this->get('user');
|
||||
Zer.ooo is made to simplify the managing of your OpenVPN servers and certificates. automating the CA and server provisioning.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$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
|
||||
<?php
|
||||
|
||||
namespace Eater\Glim\Service;
|
||||
|
||||
class User extends Main
|
||||
{
|
||||
function login($username, $password)
|
||||
{
|
||||
if ($username == "4" && $password == "2") {
|
||||
$user = new \stdClass();
|
||||
$user->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)
|
BIN
public/.DS_Store
vendored
BIN
public/.DS_Store
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/css/.DS_Store
vendored
BIN
public/css/.DS_Store
vendored
Binary file not shown.
BIN
public/fonts/.DS_Store
vendored
BIN
public/fonts/.DS_Store
vendored
Binary file not shown.
Loading…
Reference in a new issue