Service.php
public static function endpointsInfo(Application $app)
    {
        $app->boot();

        /** @var ControllerCollection $controllers */
        $controllers = $app['controllers'];
        $rControllers = new ReflectionObject($controllers);
        $pControllers = $rControllers->getProperty('controllers');
        $pControllers->setAccessible(true);

        /** @var Controller $ctrl */
        foreach ($pControllers->getValue($controllers) as $ctrl) {
            if ($ctrl instanceof Controller) {
                $route = $ctrl->getRoute();

                foreach ($route->getMethods() as $method) {
                    echo '- ' . str_pad($method, 7) . ' ' . str_pad($route->getPath(), 70);

                    if ($service = $route->getDefault('_controller')) {
                        if (is_scalar($service)) {
                            echo 'Handler: ' . $service;
                        }
                    }

                    echo "\n";
                }
            }
        }
    }
public static function endpointsInfo(Application $app)
    {
        $app->boot();

        /** @var ControllerCollection $controllers */
        $controllers = $app['controllers'];
        $rControllers = new ReflectionObject($controllers);
        $pControllers = $rControllers->getProperty('controllers');
        $pControllers->setAccessible(true);

        /** @var Controller $ctrl */
        foreach ($pControllers->getValue($controllers) as $ctrl) {
            if ($ctrl instanceof Controller) {
                $route = $ctrl->getRoute();

                foreach ($route->getMethods() as $method) {
                    echo '- ' . str_pad($method, 7) . ' ' . str_pad($route->getPath(), 70);

                    if ($service = $route->getDefault('_controller')) {
                        if (is_scalar($service)) {
                            echo 'Handler: ' . $service;
                        }
                    }

                    echo "\n";
                }
            }
        }
    }
public static function endpointsInfo ( Application $ app ) { $ app -> boot ( ) ; /** @var ControllerCollection $controllers */ $ controllers = $ app [ 'controllers' ] ; $ rControllers = new ReflectionObject ( $ controllers ) ; $ pControllers = $ rControllers -> getProperty ( 'controllers' ) ; $ pControllers -> setAccessible ( true ) ; /** @var Controller $ctrl */ foreach ( $ pControllers -> getValue ( $ controllers ) as $ ctrl ) { if ( $ ctrl instanceof Controller ) { $ route = $ ctrl -> getRoute ( ) ; foreach ( $ route -> getMethods ( ) as $ method ) { echo '- ' . str_pad ( $ method , 7 ) . ' ' . str_pad ( $ route -> getPath ( ) , 70 ) ; if ( $ service = $ route -> getDefault ( '_controller' ) ) { if ( is_scalar ( $ service ) ) { echo 'Handler: ' . $ service ; } } echo "\n" ; } } } }
Simple method to print application resources.

@param Application $app
Simple method to print application resources .