public function addDef($sec, $key, $value)
    {
        if ('' == $value) {
            return;
        }
        $ast = new Assertion();
        $ast->key = $key;
        $ast->value = $value;

        if ('r' == $sec || 'p' == $sec) {
            $ast->tokens = explode(', ', $ast->value);
            foreach ($ast->tokens as $i => $token) {
                $ast->tokens[$i] = $key.'_'.$token;
            }
        } else {
            $ast->value = Util::removeComments(Util::escapeAssertion($ast->value));
        }

        $this->model[$sec][$key] = $ast;

        return true;
    }
public function addDef($sec, $key, $value)
    {
        if ('' == $value) {
            return;
        }
        $ast = new Assertion();
        $ast->key = $key;
        $ast->value = $value;

        if ('r' == $sec || 'p' == $sec) {
            $ast->tokens = explode(', ', $ast->value);
            foreach ($ast->tokens as $i => $token) {
                $ast->tokens[$i] = $key.'_'.$token;
            }
        } else {
            $ast->value = Util::removeComments(Util::escapeAssertion($ast->value));
        }

        $this->model[$sec][$key] = $ast;

        return true;
    }
public function addDef ( $ sec , $ key , $ value ) { if ( '' == $ value ) { return ; } $ ast = new Assertion ( ) ; $ ast -> key = $ key ; $ ast -> value = $ value ; if ( 'r' == $ sec || 'p' == $ sec ) { $ ast -> tokens = explode ( ', ' , $ ast -> value ) ; foreach ( $ ast -> tokens as $ i => $ token ) { $ ast -> tokens [ $ i ] = $ key . '_' . $ token ; } } else { $ ast -> value = Util :: removeComments ( Util :: escapeAssertion ( $ ast -> value ) ) ; } $ this -> model [ $ sec ] [ $ key ] = $ ast ; return true ; }
adds an assertion to the model.

@param string $sec
@param string $key
@param mixed  $value

@return bool|void
adds an assertion to the model .