Request Uri handling in Multi Module Application

Beginner to phalcon framework... I followed framework documentation of phalcon to create an sample project which is having multi module file structure. Where it contained module based "views" folder like below.

  • phalco-test
    • application
      • config
        • modules.config.php
    • module
      • register
        • controllers
        • models
        • views
        • Module.php
      • default
        • controllers
        • models
        • views
        • Module.php
    • public
      • .htaccess
      • index.php

Able to setup and run the application, my query is, in documentation the application handling method doesn't contain request uri as parameter

echo $application->handle()->getContent();

If we won't pass the request uri, like below

`$requestUri = strreplace( $SERVER["SCRIPTNAME"], '', $SERVER["REQUEST_URI"]);` echo $application->handle($requestUri)->getContent();

always it will go to default controller action.. Did i missed anything or we need pass uri to work with different routes? how does it work?

Phalcon by default takes uri from $GET['_uri'] . if you dont have that setup with rewrite rule, or you are maybe using built in php server, you can instruct router to read $_REQUEST_URI instead: $router->setUriSource(Router::URISOURCE_SERVER_REQUEST_URI); // use $_SERVER['REQUEST_URI']

you can read about it here -> http://docs.phalconphp.com/en/latest/reference/routing.html#uri-sources