Router

This file connects the URL and the classes that will generate the pages for them.
The default page for missing URLs is set by the attribute defaultPage.
Let’s consider a generic line ["/Page1/$foo", "Page01", ["Hello", "World!"]]:

  • “/Page1/$foo”: This is the URL, in particular $foo is a parameter that will be passed to the application through the command $this->page["foo"].
  • “Page01”: that will generate the page.
  • [“Hello”, “World!”]: These are two additional parameters that can be used through commands $this->page[0] and $this->page[1].
{
  "defaultPage" : ["Page404", []],
  "pages": [
    ["/Page404", "Page404", []],
    ["/",        "Home",    []],
    ["/Home",    "Home",    []],
    ["/Page1",   "Page01",  []]
  ]
}