| @@ 62-71 (lines=10) @@ | ||
| 59 | } |
|
| 60 | } else if (preg_match('#^\$([A-Za-z0-9_]+)->([a-zA-Z0-9_]+)\(\s*\)\s*#', $str, $a)) { |
|
| 61 | /* ? $obj->method() */ |
|
| 62 | if (isset($GLOBALS[$a[1]]) && is_object($GLOBALS[$a[1]])) { |
|
| 63 | $class = get_class($GLOBALS[$a[1]]); |
|
| 64 | $method = $a[2]; |
|
| 65 | ||
| 66 | $c = new ReflectionClass($class); |
|
| 67 | ||
| 68 | if ($c->hasMethod($method)) { |
|
| 69 | $cmd = $c->getMethod($method)->getDocComment(); |
|
| 70 | } |
|
| 71 | } |
|
| 72 | } else if (preg_match('#^([A-Za-z0-9_]+)::([a-zA-Z0-9_]+)\s*$#', $str, $a)) { |
|
| 73 | /* ? Class::property */ |
|
| 74 | $class = $a[1]; |
|
| @@ 85-95 (lines=11) @@ | ||
| 82 | } |
|
| 83 | } else if (preg_match('#^\$([A-Za-z0-9_]+)->([a-zA-Z0-9_]+)\s*$#', $str, $a)) { |
|
| 84 | /* ? $obj->property */ |
|
| 85 | if (isset($GLOBALS[$a[1]]) && is_object($GLOBALS[$a[1]])) { |
|
| 86 | $class = get_class($GLOBALS[$a[1]]); |
|
| 87 | $method = $a[2]; |
|
| 88 | ||
| 89 | $c = new ReflectionClass($class); |
|
| 90 | ||
| 91 | if ($c->hasProperty($property)) { |
|
| 92 | $cmd = $c->getProperty($property)->getDocComment(); |
|
| 93 | } |
|
| 94 | ||
| 95 | } |
|
| 96 | } else if (preg_match('#^([A-Za-z0-9_]+)$#', $str, $a)) { |
|
| 97 | /* ? Class */ |
|
| 98 | if (class_exists($a[1], false)) { |
|