Skip to content

Nette Framework extension with prepend route support

License

Notifications You must be signed in to change notification settings

FreezyBee/PrependRoute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quickstart

Build Status Coverage Status

Installation

The best way to install FreezyBee/PrependRoute is using Composer:

composer require freezy-bee/prepend-route

With Nette 2.4 and newer, you can enable the extension using your neon config.

extensions:
	prependRoute: FreezyBee\PrependRoute\DI\PrependRouteExtension

Documentation

Usage

Your extension MUST implements interface FreezyBee\PrependRoute\DI\IPrependRouteProvider.

class TestExtension extends CompilerExtension implements IPrependRouteProvider
{
    public function loadConfiguration(): void
    {
        // register route service (testRoute)
        ...
    }

    /**
     * Return array of services - service MUST implements IRoute
     * @return string[]
     */
    public function getPrependRoutes(): array
    {
        return [$this->prefix('testRoute')];
    }
}

About

Nette Framework extension with prepend route support

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages