Kernel


Kernel

Think of the project Kernel as the central point from which you can extend and modify Tapestry's behaviour. Your project Kernel must implement the KernelInterface which has two public methods register and boot.

The project Kernel is loaded and constructed as soon as Tapestry identifies and loads the workspace configuration, with its __construct method having the instance of Tapestry injected into it. This provides you direct access to the core of Tapestry within your site Kernel as soon as it is constructed. Your constructor should also be where you include your project specific composer auto-loader, if one is being used.

Register Method

The register method of your project Kernel is executed as soon as Tapestry identifies and loads the class. This is one of the first things in Tapestry's execution order and therefore the best place to extend Tapestry with your own commands and also where to inject and modify build Steps.

Boot Method

The boot method of your project Kernel is executed by the build command as part of generating your project; it is here where your event hooks and build specific extensions should reside.