roundcubemail/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
public function set_var($name, $value, $mods = array())
    {
        // Check if variable exists
        for ($i=0, $len=count($this->vars); $i<$len; $i++) {
            if ($this->vars[$i]['name'] == $name) {
                break;
            }
        }

        $var = array_merge($mods, array('name' => $name, 'value' => $value));
        $this->vars[$i] = $var;
    }
public function set_var($name, $value, $mods = array())
    {
        // Check if variable exists
        for ($i=0, $len=count($this->vars); $i<$len; $i++) {
            if ($this->vars[$i]['name'] == $name) {
                break;
            }
        }

        $var = array_merge($mods, array('name' => $name, 'value' => $value));
        $this->vars[$i] = $var;
    }
public function set_var ( $ name , $ value , $ mods = array ( ) ) { // Check if variable exists for ( $ i = 0 , $ len = count ( $ this -> vars ) ; $ i < $ len ; $ i ++ ) { if ( $ this -> vars [ $ i ] [ 'name' ] == $ name ) { break ; } } $ var = array_merge ( $ mods , array ( 'name' => $ name , 'value' => $ value ) ) ; $ this -> vars [ $ i ] = $ var ; }
Sets "global" variable

@param string $name  Variable name
@param string $value Variable value
@param array  $mods  Variable modifiers
Sets global variable