Skip to content

doomspork/sleepy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sleepy

"Helping you get a RESTful sleep"

It ain't easy - being cheesy

What is it really?

Sleepy is an experimental RESTful framework, the uniqueness comes in the form of annotations. Relying on a specified format in the doc comments sleepy is able to parse, locate, and instantiate a wide range of annotations. Annotations themselves are plugins allowing third-party developers the ability to implement new and exciting functionality whenever!

Sleepy is simple

Annotations in sleepy can be placed on functions or methods of a class; the choice is yours.

Class

class Nue {
  /**
  * @Route(GET, /)
  */
  public function index() {
    echo 'Index!';
  }
  
  /**
  * @Route(GET, /slug/:slug, :slug > [0-9a-z]*)
  */
  public function slug($slug) {
    echo 'SlugValue: ' . $slug . '</br>';
  }
  
  /**
  * @Route(GET, /params/:param/:paramjam, :param > [a-zA-Z]{2,4}, :paramjam > [0-9]*)
  */
  public function params($param, $paramjam) {
    echo 'ParamValue: ' . $param . '</br>';
    echo 'ParamJamValue: ' . $paramjam . '</br>';
  }
}

Function

/**
* @Route(POST, /login)
*/
function login() {
  return $_POST['password'] = 'password';
}

Annotations

About

PHP Framework utilizing annotations for RESTful applications.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages