Skip to content

nickforsman/PHP-Snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-Snowflake

Build Status

Snowflake: Simple php microframework

Snowflake is a php microframework, inspired by a random redditor who also created a php microframework. Snowflake does not use any 3rd party libraries, everything is built from the ground up. Snowflake is heavily influenced by its many counterparts, Lumen, Slim...etc.

Warning:

This "framework" should never be used in production...or anywhere else. This was just a test applicaiton I created. If you want to use real micro frameworks, checkout lumen, slim and silex.

How it works

Start the app

$app = new Snowflake\Snowflake();

Register a route

$app->get('/home', [], function() {
	echo "Hello World";
});
You can also register a controller
$app->post('/home', ['controller' => 'HomeController@index']);
You can also send custom headers
$app->get('/home', ['header' => 'Application/json'], function() {
	return "Hello World";
});

Inject the router

$app->setRouter(new Snowflake\Routing\Router($app->getRegisteredRoutes()));

Run the application

$app->start();

About

a super simple php micro framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages