roundcubemail/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
private function action_arguments(&$tokens, $bool_args, $val_args = array())
    {
        $action = array();
        $result = array();

        for ($i=0, $len=count($tokens); $i<$len; $i++) {
            $tok = $tokens[$i];
            if (!is_array($tok) && $tok[0] == ':') {
                $tok = strtolower(substr($tok, 1));
                if (in_array($tok, $bool_args)) {
                    $action[$tok] = true;
                }
                else if (in_array($tok, $val_args)) {
                    $action[$tok] = $tokens[++$i];
                }
                else {
                    $result[] = $tok;
                }
            }
            else {
                $result[] = $tok;
            }
        }

        $tokens = $result;

        return $action;
    }
private function action_arguments(&$tokens, $bool_args, $val_args = array())
    {
        $action = array();
        $result = array();

        for ($i=0, $len=count($tokens); $i<$len; $i++) {
            $tok = $tokens[$i];
            if (!is_array($tok) && $tok[0] == ':') {
                $tok = strtolower(substr($tok, 1));
                if (in_array($tok, $bool_args)) {
                    $action[$tok] = true;
                }
                else if (in_array($tok, $val_args)) {
                    $action[$tok] = $tokens[++$i];
                }
                else {
                    $result[] = $tok;
                }
            }
            else {
                $result[] = $tok;
            }
        }

        $tokens = $result;

        return $action;
    }
private function action_arguments ( & $ tokens , $ bool_args , $ val_args = array ( ) ) { $ action = array ( ) ; $ result = array ( ) ; for ( $ i = 0 , $ len = count ( $ tokens ) ; $ i < $ len ; $ i ++ ) { $ tok = $ tokens [ $ i ] ; if ( ! is_array ( $ tok ) && $ tok [ 0 ] == ':' ) { $ tok = strtolower ( substr ( $ tok , 1 ) ) ; if ( in_array ( $ tok , $ bool_args ) ) { $ action [ $ tok ] = true ; } else if ( in_array ( $ tok , $ val_args ) ) { $ action [ $ tok ] = $ tokens [ ++ $ i ] ; } else { $ result [ ] = $ tok ; } } else { $ result [ ] = $ tok ; } } $ tokens = $ result ; return $ action ; }
Extract action arguments
Extract action arguments