Back to index

moin  1.9.0~rc2
Functions | Variables
MoinMoin.support.pygments.lexers._phpbuiltins Namespace Reference

Functions

def get_php_functions
def get_function_module

Variables

dictionary MODULES
tuple _function_re = re.compile('<B\s+CLASS="function"\s*>(.*?)\(\)</B\s*>(?uism)')
tuple functions = get_php_functions()
tuple total = len(functions)
dictionary modules = {}
int idx = 1
tuple m = get_function_module(function_name)
tuple f = open(__file__)
tuple content = f.read()
list header = content[:content.find('MODULES = {')]
list footer = content[content.find("if __name__ == '__main__':"):]

Function Documentation

Definition at line 3348 of file _phpbuiltins.py.

03348 
03349     def get_function_module(func_name):
03350         fn = func_name.replace('_', '-')
03351         uf = urllib.urlopen('http://de.php.net/manual/en/function.%s.php' % fn)
03352         regex = re.compile('<li class="header up">'
03353                            '<a href="ref\..*?\.php">([a-zA-Z0-9\s]+)</a></li>')
03354         for line in uf:
03355             match = regex.search(line)
03356             if match:
03357                 return match.group(1)

Definition at line 3334 of file _phpbuiltins.py.

03334 
03335     def get_php_functions():
03336         uf = urllib.urlopen('http://de.php.net/manual/en/index.functions.php')
03337         data = uf.read()
03338         uf.close()
03339         results = set()
03340         for match in _function_re.finditer(data):
03341             fn = match.group(1)
03342             if '-&#62;' not in fn and '::' not in fn:
03343                 results.add(fn)
03344         # PY24: use sorted()
03345         results = list(results)
03346         results.sort()
03347         return results


Variable Documentation

tuple MoinMoin.support.pygments.lexers._phpbuiltins._function_re = re.compile('<B\s+CLASS="function"\s*>(.*?)\(\)</B\s*>(?uism)')

Definition at line 3332 of file _phpbuiltins.py.

Definition at line 3378 of file _phpbuiltins.py.

Definition at line 3376 of file _phpbuiltins.py.

list MoinMoin.support.pygments.lexers._phpbuiltins.footer = content[content.find("if __name__ == '__main__':"):]

Definition at line 3382 of file _phpbuiltins.py.

Definition at line 3359 of file _phpbuiltins.py.

Definition at line 3381 of file _phpbuiltins.py.

Definition at line 3363 of file _phpbuiltins.py.

Definition at line 3366 of file _phpbuiltins.py.

Definition at line 20 of file _phpbuiltins.py.

Definition at line 3362 of file _phpbuiltins.py.

Definition at line 3360 of file _phpbuiltins.py.