Exakat\Analyzer\Security\RegisterGlobals::analyze PHP Method

analyze() public method

public analyze ( )
    public function analyze()
    {
        $superGlobals = $this->loadIni('php_superglobals.ini', 'superglobal');
        // With a foreach
        $this->atomIs('Foreach')->outIs('SOURCE')->codeIs($superGlobals, true)->inIs('SOURCE')->outIs('VALUE')->outIs('KEY')->savePropertyAs('code', 'k')->inIs('KEY')->inIs('VALUE')->outIs('BLOCK')->atomInside('Variable')->analyzerIs('Variables/IsModified')->tokenIs('T_DOLLAR')->outIs('NAME')->samePropertyAs('code', 'k')->back('first');
        $this->prepareQuery();
        // With extract and overwriting option
        $this->atomFunctionIs('\\extract')->outIs('ARGUMENTS')->outWithRank('ARGUMENT', 0)->codeIs($superGlobals, true)->inIs('ARGUMENT')->outWithRank('ARGUMENT', 1)->regexIs('fullcode', '(EXTR_OVERWRITE|EXTR_IF_EXISTS)')->back('first');
        $this->prepareQuery();
        // With extract and default option (EXTR_OVERWRITE)
        $this->atomFunctionIs('\\extract')->outIs('ARGUMENTS')->noChildWithRank('ARGUMENT', 1)->outWithRank('ARGUMENT', 0)->codeIs($superGlobals, true)->back('first');
        $this->prepareQuery();
        // With parse_url and no final argument
        $this->atomFunctionIs('\\parse_str')->outIs('ARGUMENTS')->noChildWithRank('ARGUMENT', 1)->back('first');
        $this->prepareQuery();
        // With import_request_variables
        $this->atomIs('Functioncall')->fullnspathIs('\\import_request_variables');
        $this->prepareQuery();
        // Other methods?
    }
RegisterGlobals