Phalcon\Build\Generator_File_PhalconH::limitVisibilityOfPhalconFuncs PHP Method

limitVisibilityOfPhalconFuncs() protected method

Go through the generated file and put 'static' to all declarations of Phalcon-related functions
    protected function limitVisibilityOfPhalconFuncs()
    {
        $resContent = '';
        foreach (file($this->outputFile) as $line) {
            if (preg_match('/^PHP_METHOD\\(([a-zA-Z0-9\\_]+), ([a-zA-Z0-9\\_]+)\\)/', $line, $matches)) {
                $line = str_replace($matches[0], 'static PHP_METHOD(' . $matches[1] . ', ' . $matches[2] . ')', $line);
            }
            $line = preg_replace('/^PHALCON_STATIC /', 'static ', $line);
            $resContent .= $line;
        }
        file_put_contents($this->outputFile, $resContent);
    }