PHP code example of freezy-bee / prepend-route

1. Go to this page and download the library: Download freezy-bee/prepend-route library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

freezy-bee / prepend-route example snippets



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')];
    }
}