Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Document inherited methods (#46)
Browse files Browse the repository at this point in the history
* Document inherited methods

Breaking change: the index needs to retain and expose the full
data, not just the strings.

refs hhvm/user-documentation#1125

* update generated documentation

* more new docs!

* tabs/spaces
  • Loading branch information
fredemmott authored Jan 4, 2022
1 parent f9984f2 commit 8efa0ca
Show file tree
Hide file tree
Showing 29 changed files with 417 additions and 158 deletions.
6 changes: 0 additions & 6 deletions docs/class.Facebook.HHAPIDoc.GeneratorCLI.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ <h3>Protected Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.GeneratorCLI.getSupportedOptions.html"><code>-&gt;getSupportedOptions(): vec&lt;\Facebook\CLILib\CLIOptions\CLIOption&gt;</code></a></li>
</ul>
<h3>Private Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.GeneratorCLI.parse.html"><code>-&gt;parse(): vec&lt;Documentable&gt;</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.GeneratorCLI.verboseWrite.html"><code>-&gt;verboseWrite(string $what): void</code></a><br />
Write output only if verbose mode is set</li>
</ul>

</body>
</html>
2 changes: 1 addition & 1 deletion docs/class.Facebook.HHAPIDoc.IndexDocumentBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h3>Protected Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.IndexDocumentBuilder.getContext.html"><code>-&gt;getContext(): DocumentationBuilderContext</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.IndexDocumentBuilder.getIndexDocumentMarkdown.html"><code>-&gt;getIndexDocumentMarkdown(): string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.IndexDocumentBuilder.renderPart.html"><code>-&gt;renderPart(string $title, keyset&lt;string&gt; $names, (function(string): ?string) $get_path): ?string</code></a><br />
<li><a href="class.Facebook.HHAPIDoc.IndexDocumentBuilder.renderPart.html"><code>-&gt;renderPart(string $title, dict&lt;string, Documentable&gt; $entries, (function(string): ?string) $get_path): ?string</code></a><br />
Render an index section to Markdown</li>
<li><a href="class.Facebook.HHAPIDoc.IndexDocumentBuilder.renderToHTML.html"><code>-&gt;renderToHTML(string $markdown): string</code></a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ <h1>Facebook\HHAPIDoc\IndexDocumentBuilder::renderPart()</h1>
<p>Render an index section to Markdown</p>
<pre><code class="language-Hack">protected function renderPart(
string $title,
keyset&lt;string&gt; $names,
dict&lt;string, Facebook\HHAPIDoc\Documentable&gt; $entries,
(function(string): ?string) $get_path,
): ?string;
</code></pre>
<h2>Parameters</h2>
<ul>
<li><code>string $title</code> the title of the section - e.g. 'Classes'</li>
<li><code>keyset&lt;string&gt; $names</code> the names of all the definitions that belong in this section</li>
<li><code>dict&lt;string, Facebook\HHAPIDoc\Documentable&gt; $entries</code></li>
<li><code>(function(string): ?string) $get_path</code> a callable that takes a name from <code>$names</code> and returns
<code>null</code> if a path can't be found, otherwise returns a path suitable for
linking to for the specified name.</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<html>
<head>
<title>Facebook\HHAPIDoc\IndexedPathProvider::isMethodDefined</title>
<style>
/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/

/* Keywords */

.hs-FunctionToken,
.hs-NamespaceToken {
color: #c678dd;
}

/* Types */

.hs-SimpleTypeSpecifier .hs-StringToken {
color: #e5c07b;
}

.hs-ClassDeclaration .hs-NameToken {
color: #e5c07b;
}

/* Functions */

.hs-FunctionDeclaration .hs-NameToken {
color: #61afef;
}

/* Variables */

.hs-VariableToken {
color: #e06c75;
}
</style>
</head>
<body>
<h1>Facebook\HHAPIDoc\IndexedPathProvider::isMethodDefined()</h1>
<pre><code class="language-Hack">private function isMethodDefined(
dict&lt;string, Facebook\HHAPIDoc\Documentable&gt; $index,
string $classish,
string $method,
): bool;
</code></pre>
<h2>Parameters</h2>
<ul>
<li><code>dict&lt;string, Facebook\HHAPIDoc\Documentable&gt; $index</code></li>
<li><code>string $classish</code></li>
<li><code>string $method</code></li>
</ul>
<h2>Returns</h2>
<ul>
<li><code>bool</code></li>
</ul>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ <h3>Public Methods</h3>
<li><a href="class.Facebook.HHAPIDoc.MarkdownExt.AutoLinkifyFilter.filter.html"><code>-&gt;filter(\Facebook\Markdown\RenderContext $context, \Facebook\Markdown\ASTNode $node): vec&lt;\Facebook\Markdown\ASTNode&gt;</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.MarkdownExt.AutoLinkifyFilter.resetFileData.html"><code>-&gt;resetFileData(): this</code></a></li>
</ul>
<h3>Private Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.MarkdownExt.AutoLinkifyFilter.getPath.html"><code>::getPath(RenderContext $context, string $search): ?string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.MarkdownExt.AutoLinkifyFilter.getPathForMethod.html"><code>::getPathForMethod(RenderContext $context, string $class_search, string $method_search): ?string</code></a></li>
</ul>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.DeprecationMessage.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>
<h3>Protected Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.DeprecationMessage.getDeprecationMessage.html"><code>-&gt;getDeprecationMessage(): ?string</code></a></li>
Expand Down
4 changes: 4 additions & 0 deletions docs/class.Facebook.HHAPIDoc.PageSections.Description.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.Description.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
</html>
4 changes: 4 additions & 0 deletions docs/class.Facebook.HHAPIDoc.PageSections.FrontMatter.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.FrontMatter.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.FunctionishParameters.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Private Methods</h3>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.FunctionishParameters.getParameterListItem.html"><code>::getParameterListItem(string $ns, \Facebook\DefinitionFinder\ScannedParameter $p, ?\Facebook\HHAPIDoc\DocBlock\ParameterInfo $docs): string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.FunctionishReturnValues.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Private Methods</h3>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.FunctionishReturnValues.getReturnValueInformation.html"><code>::getReturnValueInformation(\Facebook\DefinitionFinder\ScannedFunctionish $f, \Facebook\HHAPIDoc\DocBlock\ReturnInfo $docs): string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.FunctionishSignature.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<html>
<head>
<title>Facebook\HHAPIDoc\PageSections\InterfaceSynopsis::getLinkPathForClassish</title>
<style>
/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/

/* Keywords */

.hs-FunctionToken,
.hs-NamespaceToken {
color: #c678dd;
}

/* Types */

.hs-SimpleTypeSpecifier .hs-StringToken {
color: #e5c07b;
}

.hs-ClassDeclaration .hs-NameToken {
color: #e5c07b;
}

/* Functions */

.hs-FunctionDeclaration .hs-NameToken {
color: #61afef;
}

/* Variables */

.hs-VariableToken {
color: #e06c75;
}
</style>
</head>
<body>
<h1>Facebook\HHAPIDoc\PageSections\InterfaceSynopsis::getLinkPathForClassish()</h1>
<pre><code class="language-Hack">private function getLinkPathForClassish(
Facebook\DefinitionFinder\ScannedClassish $c,
): ?string;
</code></pre>
<h2>Parameters</h2>
<ul>
<li><code>Facebook\DefinitionFinder\ScannedClassish $c</code></li>
</ul>
<h2>Returns</h2>
<ul>
<li><code>?string</code></li>
</ul>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@
<h1>Facebook\HHAPIDoc\PageSections\InterfaceSynopsis::getMethodList()</h1>
<pre><code class="language-Hack">private function getMethodList(
string $header,
Facebook\DefinitionFinder\ScannedClassish $c,
vec&lt;Facebook\DefinitionFinder\ScannedMethod&gt; $methods,
vec&lt;(Facebook\DefinitionFinder\ScannedClassish, Facebook\DefinitionFinder\ScannedMethod)&gt; $methods,
): ?string;
</code></pre>
<h2>Parameters</h2>
<ul>
<li><code>string $header</code></li>
<li><code>Facebook\DefinitionFinder\ScannedClassish $c</code></li>
<li><code>vec&lt;Facebook\DefinitionFinder\ScannedMethod&gt; $methods</code></li>
<li><code>vec&lt;(Facebook\DefinitionFinder\ScannedClassish, Facebook\DefinitionFinder\ScannedMethod)&gt; $methods</code></li>
</ul>
<h2>Returns</h2>
<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
<body>
<h1>Facebook\HHAPIDoc\PageSections\InterfaceSynopsis::getMethodListItem()</h1>
<pre><code class="language-Hack">private function getMethodListItem(
Facebook\DefinitionFinder\ScannedClassish $c,
Facebook\DefinitionFinder\ScannedClassish $defining_class,
Facebook\DefinitionFinder\ScannedMethod $m,
): string;
</code></pre>
<h2>Parameters</h2>
<ul>
<li><code>Facebook\DefinitionFinder\ScannedClassish $c</code></li>
<li><code>Facebook\DefinitionFinder\ScannedClassish $defining_class</code></li>
<li><code>Facebook\DefinitionFinder\ScannedMethod $m</code></li>
</ul>
<h2>Returns</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.InterfaceSynopsis.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Private Methods</h3>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.InterfaceSynopsis.getInheritanceInformation.html"><code>-&gt;getInheritanceInformation(\Facebook\DefinitionFinder\ScannedClassish $c): string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.PageSections.InterfaceSynopsis.getLinkPathForMethod.html"><code>-&gt;getLinkPathForMethod(\Facebook\DefinitionFinder\ScannedClassish $c, \Facebook\DefinitionFinder\ScannedMethod $m): ?string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.PageSections.InterfaceSynopsis.getMethodList.html"><code>-&gt;getMethodList(string $header, \Facebook\DefinitionFinder\ScannedClassish $c, vec&lt;\Facebook\DefinitionFinder\ScannedMethod&gt; $methods): ?string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.PageSections.InterfaceSynopsis.getMethodListItem.html"><code>-&gt;getMethodListItem(\Facebook\DefinitionFinder\ScannedClassish $c, \Facebook\DefinitionFinder\ScannedMethod $m): string</code></a></li>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<html>
<head>
<title>Facebook\HHAPIDoc\PageSections\InterfaceSynopsis::walkMethods</title>
<style>
/*
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/

/* Keywords */

.hs-FunctionToken,
.hs-NamespaceToken {
color: #c678dd;
}

/* Types */

.hs-SimpleTypeSpecifier .hs-StringToken {
color: #e5c07b;
}

.hs-ClassDeclaration .hs-NameToken {
color: #e5c07b;
}

/* Functions */

.hs-FunctionDeclaration .hs-NameToken {
color: #61afef;
}

/* Variables */

.hs-VariableToken {
color: #e06c75;
}
</style>
</head>
<body>
<h1>Facebook\HHAPIDoc\PageSections\InterfaceSynopsis::walkMethods()</h1>
<pre><code class="language-Hack">private function walkMethods(
Facebook\DefinitionFinder\ScannedClassish $c,
): dict&lt;string, (Facebook\DefinitionFinder\ScannedClassish, Facebook\DefinitionFinder\ScannedMethod)&gt;;
</code></pre>
<h2>Parameters</h2>
<ul>
<li><code>Facebook\DefinitionFinder\ScannedClassish $c</code></li>
</ul>
<h2>Returns</h2>
<ul>
<li><code>dict&lt;string, (Facebook\DefinitionFinder\ScannedClassish, Facebook\DefinitionFinder\ScannedMethod)&gt;</code></li>
</ul>

</body>
</html>
4 changes: 4 additions & 0 deletions docs/class.Facebook.HHAPIDoc.PageSections.NameHeading.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.NameHeading.getMarkdown.html"><code>-&gt;getMarkdown(): string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
</html>
4 changes: 4 additions & 0 deletions docs/class.Facebook.HHAPIDoc.PageSections.ShapeFields.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.ShapeFields.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
</html>
4 changes: 4 additions & 0 deletions docs/class.Facebook.HHAPIDoc.PageSections.Summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ <h3>Public Methods</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.Summary.getMarkdown.html"><code>-&gt;getMarkdown(): ?string</code></a></li>
</ul>
<h3>Public Methods (<a href="class.Facebook.HHAPIDoc.PageSections.PageSection.html"><code>Facebook\HHAPIDoc\PageSections\PageSection</code></a>)</h3>
<ul>
<li><a href="class.Facebook.HHAPIDoc.PageSections.PageSection.__construct.html"><code>-&gt;__construct(\Facebook\HHAPIDoc\DocumentationBuilderContext $context, \Facebook\HHAPIDoc\Documentable $documentable, ?\Facebook\HHAPIDoc\DocBlock\DocBlock $docBlock)</code></a></li>
</ul>

</body>
</html>
Loading

0 comments on commit 8efa0ca

Please sign in to comment.