$this]; } public function onAddComponent(Configurator $configurator) { // Add dependencies $webComponent = new WebComponent(); // If it is enabled to handle requests, forward this to the WebComponent if ($this->willHandleRequest) $webComponent->enableComponent(); // And add the component $configurator->addComponent($webComponent); $configurator->addComponent(new ObjectStorageComponent()); $configurator->addComponent(new DatabaseComponent()); $configurator->addComponent(new LayoutComponent()); $configurator->addComponent(new TracyComponent()); } public function onCreateContainer(Factory $container) { } public function enableWebRequest() { $this->willHandleRequest = true; } public function disableWebRequest() { $this->willHandleRequest = false; } }