public function configKey($keyname, $option = null, $value = null)
    {
        if ($option === null) {
            $default = $this->_config;
            $local = isset($this->_keyConfig[$keyname]) ? $this->_keyConfig[$keyname] : [];

            return $local + $default;
        }
        if (!is_array($option)) {
            $option = [$option => $value];
        }
        $this->_keyConfig[$keyname] = $option;

        return null;
    }
public function configKey($keyname, $option = null, $value = null)
    {
        if ($option === null) {
            $default = $this->_config;
            $local = isset($this->_keyConfig[$keyname]) ? $this->_keyConfig[$keyname] : [];

            return $local + $default;
        }
        if (!is_array($option)) {
            $option = [$option => $value];
        }
        $this->_keyConfig[$keyname] = $option;

        return null;
    }
public function configKey ( $ keyname , $ option = null , $ value = null ) { if ( $ option === null ) { $ default = $ this -> _config ; $ local = isset ( $ this -> _keyConfig [ $ keyname ] ) ? $ this -> _keyConfig [ $ keyname ] : [ ] ; return $ local + $ default ; } if ( ! is_array ( $ option ) ) { $ option = [ $ option => $ value ] ; } $ this -> _keyConfig [ $ keyname ] = $ option ; return null ; }
Set the configuration for a specific top level key.

### Examples:

Set a single config option for a key:

```
$this->Cookie->configKey('User', 'expires', '+3 months');
```

Set multiple options:

```
$this->Cookie->configKey('User', [
'expires', '+3 months',
'httpOnly' => true,
]);
```

@param string $keyname The top level keyname to configure.
@param null|string|array $option Either the option name to set, or an array of options to set,
or null to read config options for a given key.
@param string|null $value Either the value to set, or empty when $option is an array.
@return array|null
Set the configuration for a specific top level key .