Publisher
Publishes Stuff
Instance Properties
| Name | Type | Summary |
|---|---|---|
$commentParser | Parser | The comment parser |
$mdParser | DocParser | The markdown parser |
$writer | Writer | The file writer |
Static Properties
| Name | Type | Summary |
|---|---|---|
$primitives | ImmSet<string> | |
$thisy | ImmSet<string> |
Constructors / Destructors
| Returns | Signature and Description |
|---|---|
void | __construct()Create a new Publisher. |
Instance Methods
| Returns | Signature and Description |
|---|---|
Awaitable<mixed> | doConstants(, , )Exports the page for functions. |
Awaitable<mixed> | doFunctions(, , )Exports the page for functions. |
void | publish(, )Publishes our documentation |
| Returns | Signature and Description |
|---|---|
Awaitable<mixed> | doClass(, )Exports the page for a class, interface, or trait. |
ConstVector<Awaitable<mixed>> | doNamespace(, , )Exports a single namespace. |
ConstVector<Awaitable<mixed>> | doNamespaces()Exports namespace pages. |
string | getFilename()Cleans up a filename. |
Page | getPage()Gets a page builder. |
ConstSet<string> | getSubNamespaces(, )Gets any sub-namespaces for a given namespace. |
bool | isPrimitive()Gets whether the provided type is primitive. |
bool | isThisy()Gets whether the provided typehint refers to |
bool | isVoid()Gets whether the provided typehint is void. |
Property Details
$commentParser
Parser $commentParserThe comment parser
$mdParser
DocParser $mdParserThe markdown parser
$primitives
Inherited from Producer
ImmSet<string> $primitives$thisy
Inherited from Producer
ImmSet<string> $thisy$writer
Writer $writerThe file writer
Method Details
__construct
__construct(LoggerInterface $logger)Create a new Publisher.
| Name | Type | Description |
|---|---|---|
$logger | LoggerInterface | The logger |
doClass
doClass(Job $job, ClassyDeclaration $c)Exports the page for a class, interface, or trait.
| Name | Type | Description |
|---|---|---|
$job | Job | The export job |
$c | ClassyDeclaration | The scanned token |
| Type | Description |
|---|---|
Awaitable<mixed> | Awaitable for writing the class |
doConstants
doConstants(Job $job, string $namespace, Vector<ConstantDeclaration> $constants)Exports the page for functions.
| Name | Type | Description |
|---|---|---|
$job | Job | The export job |
$namespace | string | The namespace to scan |
$constants | Vector<ConstantDeclaration> |
| Type | Description |
|---|---|
Awaitable<mixed> | Awaitable for writing the class |
doFunctions
doFunctions(Job $job, string $namespace, Vector<FunctionDeclaration> $functions)Exports the page for functions.
| Name | Type | Description |
|---|---|---|
$job | Job | The export job |
$namespace | string | The namespace to scan |
$functions | Vector<FunctionDeclaration> | The list of functions |
| Type | Description |
|---|---|
Awaitable<mixed> | Awaitable for writing the class |
doNamespace
doNamespace(Job $job, string $namespace, ConstVector<ScannedBase> $tokens)Exports a single namespace.
| Name | Type | Description |
|---|---|---|
$job | Job | The file path to contain exported pages |
$namespace | string | The namespace name |
$tokens | ConstVector<ScannedBase> | The tokens in this namespace |
| Type | Description |
|---|---|
ConstVector<Awaitable<mixed>> | The awaitables for each member of the namespace |
doNamespaces
doNamespaces(Job $job)Exports namespace pages.
| Name | Type | Description |
|---|---|---|
$job | Job | The job details |
| Type | Description |
|---|---|
ConstVector<Awaitable<mixed>> | The awaitables for each namespace |
getFilename
Inherited from Producer
getFilename(ScannedBase $c)Cleans up a filename.
| Name | Type | Description |
|---|---|---|
$c | ScannedBase | The scanned token |
| Type | Description |
|---|---|
string | The cleaned up filename |
getPage
Inherited from Producer
getPage(string $title)Gets a page builder.
| Name | Type | Description |
|---|---|---|
$title | string | The page title |
| Type | Description |
|---|---|
Page | The page builder |
getSubNamespaces
getSubNamespaces(Job $job, string $namespace)Gets any sub-namespaces for a given namespace.
| Name | Type | Description |
|---|---|---|
$job | Job | The job |
$namespace | string | The namespace |
| Type | Description |
|---|---|
ConstSet<string> |
isPrimitive
Inherited from Producer
isPrimitive(string $type)Gets whether the provided type is primitive.
| Name | Type | Description |
|---|---|---|
$type | string | The type to test |
| Type | Description |
|---|---|
bool |
|
isThisy
Inherited from Producer
isThisy(?ScannedTypehint $type)Gets whether the provided typehint refers to $this
| Name | Type | Description |
|---|---|---|
$type | ?ScannedTypehint | The typehint to test |
| Type | Description |
|---|---|
bool |
|
isVoid
Inherited from Producer
isVoid(?ScannedTypehint $type)Gets whether the provided typehint is void.
| Name | Type | Description |
|---|---|---|
$type | ?ScannedTypehint | The typehint to test |
| Type | Description |
|---|---|
bool |
|
publish
publish(string $destination, ConstVector<ScannedBase> $tokens)Publishes our documentation
| Name | Type | Description |
|---|---|---|
$destination | string | |
$tokens | ConstVector<ScannedBase> |