Respect / Doc

Generates docs that rocks your socks off.
BSD 3-Clause "New" or "Revised" License
14 stars 0 forks source link

Respect\Doc\Doc

Generates docs that rocks your socks off.

Why it rock your socks off:

  1. Tested code rocks! So it uses your PHPUnit tests as examples.
  2. Doc comments, like this, are really optional.
  3. This very documentation was generated by the project itself from the code itself.

More Info:

__construct($classOrNamespace, $documentAs=null)

Receives the namespace or class to be documented

Example 1:

$doc    = new Doc('Respect'); //Full Namespace
$title  = 'Respect\Doc\Doc' . PHP_EOL 
        . '===========';
$this->assertStringStartsWith($title, (string) $doc);

Example 2:

$doc    = new Doc('Respect\Doc'); //Specific |class Name
$title  = 'Respect\Doc\Doc' . PHP_EOL 
        . '===========';
$this->assertStringStartsWith($title, (string) $doc);

__toString()

Returns the documentation in markdown

Example 1:

$class     = 'Respect\Doc';
$doc       = new Doc($class);
$markdown  = (string) $doc;
$doc       = file_put_contents('../README.md', $markdown); //Happy Panda
$this->assertStringEqualsFile('../README.md', $markdown);

Respect\Doc\DocItem

DocItem Reflection Class to speak where is the socks to rock it.

More Info:

getClassContent()

getSections()

__call($method, $parameters)

__construct($item)

__construct Construct a doc Item

More Info:

Respect\Doc\MarkDown

speak Markdownish

More Info:

get(array , $sections)