예제 #1
0
$rst =
".. highlight:: php

Chano functions
===============

This document describes all the functions that Chano supports. Most of this 
documentation is adapated from
https://docs.djangoproject.com/en/dev/ref/templates/builtins/.

";
$prev_chanotype = false;
foreach ($methods as $method) {
    $rf_method = new ReflectionMethod('Chano', $method);
    $docblox = new DocBlox_Reflection_DocBlock($rf_method->getDocComment());
    $short = $docblox->getShortDescription();
    if (empty($short)) continue;
    $chanotype_tag = $docblox->getTagsByName('chanotype');
    if (empty($chanotype_tag)) continue;
    preg_match("#function ($method\(.*\))#Uis", $chano_src, $ms);
    $method_sig = $ms[1];
    $chanotype = $chanotype_tag[0]->getContent();
    if (empty($prev_chanotype) || $prev_chanotype != $chanotype) {
        preg_match("#/\*\*\n     \* @section $chanotype.*\*/#Uis", $chano_src, $ms);
        if (!empty($ms)) {
            $db = new DocBlox_Reflection_DocBlock($ms[0]);
            $_tags = $db->getTagsByName('section');
            $lines = explode("\n", $_tags[0]->getDescription());
            array_shift($lines);
            $headline = array_shift($lines);
            array_unshift($lines, "");