public function setContent($content) { Tag::setContent($content); // 1. none or more whitespace // 2. optionally a word with underscores followed by whitespace : as // type for the return value // 3. then optionally a word with underscores followed by () and // whitespace : as method name as used by phpDocumentor // 4. then a word with underscores, followed by ( and any character // until a ) and whitespace : as method name with signature // 5. any remaining text : as description if (preg_match('/^ # Return type (?: ([\\w\\|_\\\\]+) \\s+ )? # Legacy method name (not captured) (?: [\\w_]+\\(\\)\\s+ )? # Method name ([\\w\\|_\\\\]+) # Arguments \\(([^\\)]*)\\) \\s* # Description (.*) $/sux', $this->description, $matches)) { list(, $this->type, $this->method_name, $this->arguments, $this->description) = $matches; if (!$this->type) { $this->type = 'void'; } $this->parsedDescription = null; } else { echo date('c') . ' ERR (3): @method contained invalid contents: ' . $this->content . PHP_EOL; } return $this; }