protected function getPluralIndex($domain, $n, $fallback)
    {
        //Not loaded domain or translation, use a fallback
        if (!isset($this->plurals[$domain]) || $fallback === true) {
            return $n == 1 ? 0 : 1;
        }

        if (!isset($this->plurals[$domain]['function'])) {
            $code = self::fixTerseIfs($this->plurals[$domain]['code']);
            $this->plurals[$domain]['function'] = eval("return function (\$n) { $code };");
        }

        if ($this->plurals[$domain]['count'] <= 2) {
            return call_user_func($this->plurals[$domain]['function'], $n) ? 1 : 0;
        }

        return call_user_func($this->plurals[$domain]['function'], $n);
    }
protected function getPluralIndex($domain, $n, $fallback)
    {
        //Not loaded domain or translation, use a fallback
        if (!isset($this->plurals[$domain]) || $fallback === true) {
            return $n == 1 ? 0 : 1;
        }

        if (!isset($this->plurals[$domain]['function'])) {
            $code = self::fixTerseIfs($this->plurals[$domain]['code']);
            $this->plurals[$domain]['function'] = eval("return function (\$n) { $code };");
        }

        if ($this->plurals[$domain]['count'] <= 2) {
            return call_user_func($this->plurals[$domain]['function'], $n) ? 1 : 0;
        }

        return call_user_func($this->plurals[$domain]['function'], $n);
    }
protected function getPluralIndex ( $ domain , $ n , $ fallback ) { //Not loaded domain or translation, use a fallback if ( ! isset ( $ this -> plurals [ $ domain ] ) || $ fallback === true ) { return $ n == 1 ? 0 : 1 ; } if ( ! isset ( $ this -> plurals [ $ domain ] [ 'function' ] ) ) { $ code = self :: fixTerseIfs ( $ this -> plurals [ $ domain ] [ 'code' ] ) ; $ this -> plurals [ $ domain ] [ 'function' ] = eval ( "return function (\$n) { $code };" ) ; } if ( $ this -> plurals [ $ domain ] [ 'count' ] <= 2 ) { return call_user_func ( $ this -> plurals [ $ domain ] [ 'function' ] , $ n ) ? 1 : 0 ; } return call_user_func ( $ this -> plurals [ $ domain ] [ 'function' ] , $ n ) ; }
Executes the plural decision code given the number to decide which
plural version to take.

@param string $domain
@param string $n
@param bool   $fallback set to true to get fallback plural index

@return int
Executes the plural decision code given the number to decide which plural version to take .