Skip to content

About

Descent Framework Application Component

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

application

Descent Framework Application Component

Work in Progress

This component is currently under construction. The intended ways are:

The all-OOP way

use Descent\{
    Application\Main,
    Contracts\ConfigurationInterface,
    Facades\Request,
    Facades\Response
};

new class extends Main {
    
    public function main(ConfigurationInterface $settings)
    {
        $settings->set('framework.charset', 'utf-8');
        
        Route::get('/', function() {
            return Response::defaultDocument(
                'A website',
                'Hello World!'
            );
        });
    }
}

The "Silex" way

use Descent\Application\Application;

$app = new Application([
    'framework.charset' => 'utf-8'
]);

$app->get('/', function() use($app) {
    return $app->response()->defaultDocument(
        'A website',
        'Hello World!'
    );
});

$app->run();

About

Descent Framework Application Component

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages