Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Commit ae173d6

Browse files
committed
docs: add generated docs
1 parent cd85e1e commit ae173d6

34 files changed

+4184
-17
lines changed

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,32 @@
1-
# simple-php-apidoc
1+
# Simple PHP ApiDoc
22

33
[![Latest Version on Packagist][ico-version]][link-packagist]
44
[![Software License][ico-license]](LICENSE.md)
55
[![Total Downloads][ico-downloads]][link-downloads]
66

7-
This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what
8-
PSRs you support to avoid any confusion with users and contributors.
7+
Simple API documentation generator for your PHP library.
98

109
## Structure
1110

12-
If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.
13-
1411
```
15-
bin/
16-
build/
17-
docs/
18-
config/
19-
src/
20-
tests/
21-
vendor/
12+
bin/ Package binaries
13+
docs/ API documentation
14+
src/ Source code
15+
tests/ Unit tests
2216
```
2317

2418
## Install
2519

2620
Via Composer
2721

28-
``` bash
22+
```bash
2923
$ composer require spaceonfire/simple-php-apidoc
3024
```
3125

3226
## Usage
3327

34-
``` php
35-
$skeleton = new spaceonfire\SimplePhpApiDoc();
36-
echo $skeleton->echoPhrase('Hello, League!');
28+
```bash
29+
./vendor/bin/apidoc --help
3730
```
3831

3932
## Change log
@@ -42,7 +35,7 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re
4235

4336
## Testing
4437

45-
``` bash
38+
```bash
4639
$ composer test
4740
```
4841

docs/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# spaceonfire/simple-php-apidoc API Documentation
2+
3+
- [\spaceonfire\SimplePhpApiDoc](./spaceonfire/SimplePhpApiDoc)
4+
- Classes
5+
- [Context](./spaceonfire/SimplePhpApiDoc/Context.md)
6+
- [GeneratorCommand](./spaceonfire/SimplePhpApiDoc/GeneratorCommand.md)
7+
- [\spaceonfire\SimplePhpApiDoc\Elements](./spaceonfire/SimplePhpApiDoc/Elements)
8+
- Classes
9+
- [ArgumentElement](./spaceonfire/SimplePhpApiDoc/Elements/ArgumentElement.md)
10+
- [BaseElement](./spaceonfire/SimplePhpApiDoc/Elements/BaseElement.md)
11+
- [ClassElement](./spaceonfire/SimplePhpApiDoc/Elements/ClassElement.md)
12+
- [ConstantElement](./spaceonfire/SimplePhpApiDoc/Elements/ConstantElement.md)
13+
- [FunctionElement](./spaceonfire/SimplePhpApiDoc/Elements/FunctionElement.md)
14+
- [InterfaceElement](./spaceonfire/SimplePhpApiDoc/Elements/InterfaceElement.md)
15+
- [MethodElement](./spaceonfire/SimplePhpApiDoc/Elements/MethodElement.md)
16+
- [NamespaceElement](./spaceonfire/SimplePhpApiDoc/Elements/NamespaceElement.md)
17+
- [PropertyElement](./spaceonfire/SimplePhpApiDoc/Elements/PropertyElement.md)
18+
- [TraitElement](./spaceonfire/SimplePhpApiDoc/Elements/TraitElement.md)
19+
- Interfaces
20+
- [ElementDecoratorInterface](./spaceonfire/SimplePhpApiDoc/Elements/ElementDecoratorInterface.md)
21+
- [ElementInterface](./spaceonfire/SimplePhpApiDoc/Elements/ElementInterface.md)
22+
- [ElementVisibilityInterface](./spaceonfire/SimplePhpApiDoc/Elements/ElementVisibilityInterface.md)
23+
- [MethodOwnerInterface](./spaceonfire/SimplePhpApiDoc/Elements/MethodOwnerInterface.md)
24+
- [PropertyOwnerInterface](./spaceonfire/SimplePhpApiDoc/Elements/PropertyOwnerInterface.md)
25+
- [\spaceonfire\SimplePhpApiDoc\Elements\Collections](./spaceonfire/SimplePhpApiDoc/Elements/Collections)
26+
- Classes
27+
- [MethodsCollection](./spaceonfire/SimplePhpApiDoc/Elements/Collections/MethodsCollection.md)
28+
- [NamespacesCollection](./spaceonfire/SimplePhpApiDoc/Elements/Collections/NamespacesCollection.md)
29+
- [PropertiesCollection](./spaceonfire/SimplePhpApiDoc/Elements/Collections/PropertiesCollection.md)
30+
- [TraitsCollection](./spaceonfire/SimplePhpApiDoc/Elements/Collections/TraitsCollection.md)
31+
- [TypedCollection](./spaceonfire/SimplePhpApiDoc/Elements/Collections/TypedCollection.md)
32+
- Interfaces
33+
- [FilterableByVisibilityCollectionInterface](./spaceonfire/SimplePhpApiDoc/Elements/Collections/FilterableByVisibilityCollectionInterface.md)
34+
- Traits
35+
- [FilterableByVisibilityCollectionTrait](./spaceonfire/SimplePhpApiDoc/Elements/Collections/FilterableByVisibilityCollectionTrait.md)
36+
- [\spaceonfire\SimplePhpApiDoc\Elements\DocBlockResolver](./spaceonfire/SimplePhpApiDoc/Elements/DocBlockResolver)
37+
- Classes
38+
- [BaseDocBlockResolver](./spaceonfire/SimplePhpApiDoc/Elements/DocBlockResolver/BaseDocBlockResolver.md)
39+
- [ClassDocBlockResolver](./spaceonfire/SimplePhpApiDoc/Elements/DocBlockResolver/ClassDocBlockResolver.md)
40+
- [MethodDocBlockResolver](./spaceonfire/SimplePhpApiDoc/Elements/DocBlockResolver/MethodDocBlockResolver.md)
41+
- [PropertyDocBlockResolver](./spaceonfire/SimplePhpApiDoc/Elements/DocBlockResolver/PropertyDocBlockResolver.md)
42+
- [\spaceonfire\SimplePhpApiDoc\Renderers](./spaceonfire/SimplePhpApiDoc/Renderers)
43+
- Classes
44+
- [BaseRenderer](./spaceonfire/SimplePhpApiDoc/Renderers/BaseRenderer.md)
45+
- Interfaces
46+
- [RendererInterface](./spaceonfire/SimplePhpApiDoc/Renderers/RendererInterface.md)
47+
- [\spaceonfire\SimplePhpApiDoc\Renderers\Markdown](./spaceonfire/SimplePhpApiDoc/Renderers/Markdown)
48+
- Classes
49+
- [MarkdownHelper](./spaceonfire/SimplePhpApiDoc/Renderers/Markdown/MarkdownHelper.md)
50+
- [MarkdownRenderer](./spaceonfire/SimplePhpApiDoc/Renderers/Markdown/MarkdownRenderer.md)
51+
52+
---
53+
54+
This file automatically generated by [Simple PHP ApiDoc](https://github.com/spaceonfire/simple-php-apidoc)
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Class Context
2+
3+
- Full name: `\spaceonfire\SimplePhpApiDoc\Context`
4+
5+
## Properties
6+
7+
|Property|Type|Description|Default Value|
8+
|---|---|---|---|
9+
|`protected $classes`|<code>\spaceonfire\SimplePhpApiDoc\Elements\ClassElement[]</code>|||
10+
|`protected $constants`|<code>\spaceonfire\SimplePhpApiDoc\Elements\ConstantElement[]</code>|||
11+
|`protected $filesMap`|<code>\phpDocumentor\Reflection\Php\File[]&#124;array</code>|Map full qualified name to file object where it declared||
12+
|`protected $finder`|<code>\Symfony\Component\Finder\Finder</code>|||
13+
|`protected $functions`|<code>\spaceonfire\SimplePhpApiDoc\Elements\FunctionElement[]</code>|||
14+
|`protected $interfaces`|<code>\spaceonfire\SimplePhpApiDoc\Elements\InterfaceElement[]</code>|||
15+
|`protected $namespaces`|<code>\spaceonfire\SimplePhpApiDoc\Elements\Collections\NamespacesCollection</code>|||
16+
|`protected $project`|<code>\phpDocumentor\Reflection\Php\Project&#124;\phpDocumentor\Reflection\Project</code>|||
17+
|`protected $projectName`|<code>string</code>|||
18+
|`protected $traits`|<code>\spaceonfire\SimplePhpApiDoc\Elements\TraitElement[]</code>|||
19+
20+
## Methods
21+
22+
### __construct()
23+
24+
Context constructor.
25+
26+
|Param|Type|Description|
27+
|---|---|---|
28+
|`$projectName`|*string*||
29+
|`$finder`|*\Symfony\Component\Finder\Finder*||
30+
31+
```php
32+
public function Context::__construct(string $projectName, \Symfony\Component\Finder\Finder $finder): mixed
33+
```
34+
35+
File location: `src/Context.php:73`
36+
37+
### elementFactory()
38+
39+
Decorate phpDocumentor elements with custom element classes
40+
41+
|Param|Type|Description|
42+
|---|---|---|
43+
|`$element`|*\phpDocumentor\Reflection\Element|mixed*|Element to decorate|
44+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\ElementInterface|mixed*|Decorated element or source element if there no mappings for this type|
45+
46+
```php
47+
public function Context::elementFactory(mixed $element): mixed
48+
```
49+
50+
File location: `src/Context.php:111`
51+
52+
### getClasses()
53+
54+
Returns a list of class descriptors contained in project files.
55+
56+
|Param|Type|Description|
57+
|---|---|---|
58+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\ClassElement[]*||
59+
60+
```php
61+
public function Context::getClasses(): array
62+
```
63+
64+
File location: `src/Context.php:185`
65+
66+
### getConstants()
67+
68+
Returns a list of constant descriptors contained in project files.
69+
70+
|Param|Type|Description|
71+
|---|---|---|
72+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\ConstantElement[]*||
73+
74+
```php
75+
public function Context::getConstants(): array
76+
```
77+
78+
File location: `src/Context.php:224`
79+
80+
### getElement()
81+
82+
Get element object by name
83+
84+
|Param|Type|Description|
85+
|---|---|---|
86+
|`$fqsen`|*string*|Fully Qualified Structural Element Name|
87+
|**Return**|*mixed|null*||
88+
89+
```php
90+
public function Context::getElement(string $fqsen): mixed
91+
```
92+
93+
File location: `src/Context.php:261`
94+
95+
### getFile()
96+
97+
Get file by element name
98+
99+
|Param|Type|Description|
100+
|---|---|---|
101+
|`$fqsen`|*string*|Fully Qualified Structural Element Name|
102+
|**Return**|*\phpDocumentor\Reflection\Php\File|null*||
103+
104+
```php
105+
public function Context::getFile(string $fqsen): ?\spaceonfire\SimplePhpApiDoc\phpDocumentor\Reflection\Php\File
106+
```
107+
108+
File location: `src/Context.php:251`
109+
110+
### getFunctions()
111+
112+
Returns a list of function descriptors contained in project files.
113+
114+
|Param|Type|Description|
115+
|---|---|---|
116+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\FunctionElement[]*||
117+
118+
```php
119+
public function Context::getFunctions(): array
120+
```
121+
122+
File location: `src/Context.php:237`
123+
124+
### getInterfaces()
125+
126+
Returns a list of interface descriptors contained in project files.
127+
128+
|Param|Type|Description|
129+
|---|---|---|
130+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\InterfaceElement[]*||
131+
132+
```php
133+
public function Context::getInterfaces(): array
134+
```
135+
136+
File location: `src/Context.php:198`
137+
138+
### getNamespaces()
139+
140+
Returns all namespaces with their sub-elements.
141+
142+
|Param|Type|Description|
143+
|---|---|---|
144+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\Collections\NamespacesCollection*||
145+
146+
```php
147+
public function Context::getNamespaces(): \spaceonfire\SimplePhpApiDoc\spaceonfire\SimplePhpApiDoc\Elements\Collections\NamespacesCollection
148+
```
149+
150+
File location: `src/Context.php:149`
151+
152+
### getProject()
153+
154+
Getter for `project` property
155+
156+
|Param|Type|Description|
157+
|---|---|---|
158+
|**Return**|*\phpDocumentor\Reflection\Php\Project|\phpDocumentor\Reflection\Project*||
159+
160+
```php
161+
public function Context::getProject(): \spaceonfire\SimplePhpApiDoc\phpDocumentor\Reflection\Project
162+
```
163+
164+
File location: `src/Context.php:101`
165+
166+
### getTraits()
167+
168+
Returns a list of trait descriptors contained in project files.
169+
170+
|Param|Type|Description|
171+
|---|---|---|
172+
|**Return**|*\spaceonfire\SimplePhpApiDoc\Elements\TraitElement[]*||
173+
174+
```php
175+
public function Context::getTraits(): array
176+
```
177+
178+
File location: `src/Context.php:211`
179+
180+
---
181+
182+
This file automatically generated by [Simple PHP ApiDoc](https://github.com/spaceonfire/simple-php-apidoc)

0 commit comments

Comments
 (0)