public function set($key, $value)
    {
        if (0 == \strlen($key)) {
            throw new CasbinException('key is empty');
        }

        $section = '';

        $keys = explode('::', strtolower($key));
        if (\count($keys) >= 2) {
            $section = $keys[0];
            $option = $keys[1];
        } else {
            $option = $keys[0];
        }
        $this->addConfig($section, $option, $value);
    }
public function set($key, $value)
    {
        if (0 == \strlen($key)) {
            throw new CasbinException('key is empty');
        }

        $section = '';

        $keys = explode('::', strtolower($key));
        if (\count($keys) >= 2) {
            $section = $keys[0];
            $option = $keys[1];
        } else {
            $option = $keys[0];
        }
        $this->addConfig($section, $option, $value);
    }
public function set ( $ key , $ value ) { if ( 0 == \ strlen ( $ key ) ) { throw new CasbinException ( 'key is empty' ) ; } $ section = '' ; $ keys = explode ( '::' , strtolower ( $ key ) ) ; if ( \ count ( $ keys ) >= 2 ) { $ section = $ keys [ 0 ] ; $ option = $ keys [ 1 ] ; } else { $ option = $ keys [ 0 ] ; } $ this -> addConfig ( $ section , $ option , $ value ) ; }
sets the value for the specific key in the Config.

@param string $key
@param string $value

@throws CasbinException
sets the value for the specific key in the Config .