public function setComplexConfig($name, $key, TableNode $config_table)
    {
        $value = array();
        foreach ($config_table->getHash() as $row) {
            // Allow json values for extra complexity.
            if (json_decode($row['value'])) {
                $row['value'] = json_decode($row['value'], true);
            }
            $value[$row['key']] = $row['value'];
        }
        $this->setConfig($name, $key, $value);
    }
public function setComplexConfig($name, $key, TableNode $config_table)
    {
        $value = array();
        foreach ($config_table->getHash() as $row) {
            // Allow json values for extra complexity.
            if (json_decode($row['value'])) {
                $row['value'] = json_decode($row['value'], true);
            }
            $value[$row['key']] = $row['value'];
        }
        $this->setConfig($name, $key, $value);
    }
public function setComplexConfig ( $ name , $ key , TableNode $ config_table ) { $ value = array ( ) ; foreach ( $ config_table -> getHash ( ) as $ row ) { // Allow json values for extra complexity. if ( json_decode ( $ row [ 'value' ] ) ) { $ row [ 'value' ] = json_decode ( $ row [ 'value' ] , true ) ; } $ value [ $ row [ 'key' ] ] = $ row [ 'value' ] ; } $ this -> setConfig ( $ name , $ key , $ value ) ; }
Sets complex configuration.

@param string $name
The name of the configuration object.
@param string $key
Identifier to store value in configuration.
@param TableNode $config_table
The table listing configuration keys and values.

@Given I set the configuration item :name with key :key with values:

Provide configuration data in the following format:
| key   | value  |
| foo   | bar    |
Sets complex configuration .