Skip to content

Commit

Permalink
Merge pull request #9 from edrush/master
Browse files Browse the repository at this point in the history
Support phpdomain `php:interface` and `php:trait`
  • Loading branch information
bd808 committed Jun 5, 2015
2 parents 1d4dd10 + ad92387 commit 8e2447c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Sphpdox/Element/ClassElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ public function __toString()
$string .= $title . "\n";
$string .= str_repeat('-', strlen($title)) . "\n\n";
$string .= $this->getNamespaceElement();
$string .= '.. php:class:: ' . $this->reflection->getShortName();

if ($this->reflection->isInterface()){
$string .= '.. php:interface:: ' ;
} elseif ($this->reflection->isTrait()){
$string .= '.. php:trait:: ' ;
} else {
$string .= '.. php:class:: ' ;
}
$string .= $this->reflection->getShortName();

$parser = $this->getParser();

Expand Down

0 comments on commit 8e2447c

Please sign in to comment.