src/Rad/Utils/StringUtils.php
public static function parseComments($comments) {
        $ret = [];
        //trim(str_replace(array('/', '*', '**'), '', substr($comments, 0, strpos($comments, '@'))));
        $comments = str_replace(array('/*', '*', '**'), '', $comments);
        $array_comments = explode("\n", $comments);
        foreach ($array_comments as $k => $line) {
            $line = trim($line);
            if (self::startsWith($line, "@")) {
                $params = explode(" ", $line);
                $c = trim(str_replace("@", "", array_shift($params)));
                $ret[$c] = $params;
            }
        }
        return $ret;
    }
public static function parseComments($comments) {
        $ret = [];
        //trim(str_replace(array('/', '*', '**'), '', substr($comments, 0, strpos($comments, '@'))));
        $comments = str_replace(array('/*', '*', '**'), '', $comments);
        $array_comments = explode("\n", $comments);
        foreach ($array_comments as $k => $line) {
            $line = trim($line);
            if (self::startsWith($line, "@")) {
                $params = explode(" ", $line);
                $c = trim(str_replace("@", "", array_shift($params)));
                $ret[$c] = $params;
            }
        }
        return $ret;
    }
public static function parseComments ( $ comments ) { $ ret = [ ] ; //trim(str_replace(array('/', '*', '**'), '', substr($comments, 0, strpos($comments, '@'))));
 $ comments = str_replace ( array ( '/*' , '*' , '**' ) , '' , $ comments ) ; $ array_comments = explode ( "\n" , $ comments ) ; foreach ( $ array_comments as $ k => $ line ) { $ line = trim ( $ line ) ; if ( self :: startsWith ( $ line , "@" ) ) { $ params = explode ( " " , $ line ) ; $ c = trim ( str_replace ( "@" , "" , array_shift ( $ params ) ) ) ; $ ret [ $ c ] = $ params ; } } return $ ret ; }
Parse comment, used only when generate php
@param string $comments
Parse comment used only when generate php