|
| 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[]|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|\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