PHP code example of nuvoleweb / robo-config
1. Go to this page and download the library: Download nuvoleweb/robo-config 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/ */
nuvoleweb / robo-config example snippets
class RoboFile extends Robo\Tasks {
use NuvoleWeb\Robo\Task\Config\loadTasks;
}
// Start settings processor block.
$config["system.logging"] = array('error_level' => 'verbose');
$settings["scan_tests"] = true;
// End settings processor block.
class RoboFile {
public function appendTask() {
$this->taskAppendConfiguration('/my/config.php')->run();
}
}
// Content of /my/config.php here...
// Start settings processor block.
$config["system.logging"] = array('error_level' => 'verbose');
$settings["scan_tests"] = true;
// End settings processor block.
class RoboFile {
public function appendTask() {
$this->taskPrependConfiguration('/my/config.php')->run();
}
}
// Start settings processor block.
$config["system.logging"] = array('error_level' => 'verbose');
$settings["scan_tests"] = true;
// End settings processor block.
// Content of /my/config.php here...
class RoboFile {
public function appendTask() {
$this->taskWriteConfiguration('/my/config.php')->run();
}
}
// Start settings processor block.
$config["system.logging"] = array('error_level' => 'verbose');
$settings["scan_tests"] = true;
// End settings processor block.
class RoboFile {
public function myTask() {
$config = $this->getMyConfiguration();
$this->taskAppendConfiguration('/my/config.php', $config) // Use custom configuration.
->setBlockStart('// Start') // Change opening comment.
->setBlockEnd('// End') // Change closing comment.
->setConfigKey('parameters') // Use `parameters:` instead of default `settings:`
->run();
}
}
class RoboFile {
use \NuvoleWeb\Robo\Task\Config\Php\loadTasks;
}