Skip to content
W
Sign in

Architecture

WBengine keeps the request path small and explicit. Application, Site, Section, and Box objects form the same tree used by the application code.

The object tree

  • Application is the request root and owns shared services.
  • Site represents the matched page and its metadata, access rules, and menu.
  • Section is a named layout region such as header, central, or api.
  • Box is the PHP class and method selected by a cms_boxes row.

The layout renders section output. A box can render a template directly or load a model first. Keep new features in this tree and follow the existing App\Box\<Section> namespaces.

Request outline

public/index.php
  Application::run()
    match URL to Site
    check access and page-cache eligibility
    build active Sections
      resolve configured Boxes
        call Box method and render its template
    render the site layout

Sites, sections, and boxes are configuration data. PHP classes define reusable behavior. This keeps simple page changes out of the router while leaving application logic explicit.

Live on this request

The boxes that built this page

The site /docs/architecture/ (id 11) was matched in cms_sites. These cms_boxes rows belong to it, read by the same query the framework runs.

SectionBoxClass and methodShared
central Docs: Architecture docs::page() no
central Demo: structure demo::structure() no

Shared boxes are shown on every site. The order column decides the order inside a section.