Skip to content

descent-universe/application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages