Haanga_Compiler::getOption PHP Method

getOption() public static method

getOption($option) {{{
public static getOption ( $option )
    public static function getOption($option)
    {
        $value = NULL;
        switch (strtolower($option)) {
            case 'enable_load':
                $value = self::$enable_load;
                break;
            case 'if_empty':
                $value = self::$if_empty;
                break;
            case 'autoescape':
                $value = self::$autoescape;
                break;
            case 'dot_as_object':
                $value = self::$dot_as_object;
                break;
            case 'echo_concat':
                $value = self::$echo_concat;
                break;
            case 'strip_whitespace':
                $value = self::$strip_whitespace;
                break;
            case 'is_exec_enabled':
            case 'allow_exec':
                $value = self::$is_exec_enabled;
                break;
            case 'global':
                $value = self::$global_context;
                break;
        }
        return $value;
    }

Usage Example

Example #1
0
 function yy_r29()
 {
     if (!is_file($this->yystack[$this->yyidx + 0]->minor) || !Haanga_Compiler::getOption('enable_load')) {
         $this->error($this->yystack[$this->yyidx + 0]->minor . " is not a valid file");
     }
     require_once $this->yystack[$this->yyidx + 0]->minor;
 }
All Usage Examples Of Haanga_Compiler::getOption