Currently components are given the entire skin. An interface ComponentRegistryContext is proposed to limit what context should be available to components.
It should adapt a Skin context.
- Add the ComponentRegistryContext
- Implement SkinComponentRegistryContext
- Pass SkinComponentRegistryContext rather than Skin to SkinComponentRegistry
Developer notes
interface ComponentRegistryContext {
public function getConfig(): Config;
function getTitle(): Title;
}class SkinComponentRegistryContext implements ComponentRegistryContext {
private Skin $skin;
public function __construct( Skin $skin ) {
$this->skin = $skin;
}
public function getConfig() {
}