PHP code example of netleak / config-params
1. Go to this page and download the library: Download netleak/config-params library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
netleak / config-params example snippets
use Netleak\ConfigParams;
class BasePresenter extends Nette\Application\UI\Presenter {
public ConfigParams $configParams;
public function injectConfigParams(ConfigParams $configParams): void {
$this->configParams = $configParams;
}
function startup() {
parent::startup();
$this->getTemplate()->setParameters(array('debugMode' => $this->configParams->getDebugMode()));
}
}