SilverStripe IDE Annotations

DocBlockGenerator

Class DocBlockGenerator

Table of Contents

Properties

$className  : string
The current class we are working with
$docBlockFactory  : DocBlockFactory
$reflector  : ReflectionClass
$tagGenerator  : AbstractTagGenerator

Methods

__construct()  : mixed
DocBlockGenerator constructor.
getExistingDocBlock()  : bool|string
Not that in case there are multiple doblocks for a class, the last one will be returned
getExistingTags()  : array<string|int, Tag>
getGeneratedDocBlock()  : DocBlock|string
getGeneratedTags()  : array<string|int, Tag>
removeExistingSupportedTags()  : string
Remove all existing tags that are supported by this module.
mergeGeneratedTagsIntoDocBlock()  : string

Properties

$className

The current class we are working with

protected string $className = ''

Methods

__construct()

DocBlockGenerator constructor.

public __construct( $className) : mixed
Parameters
$className :
Tags
throws
ReflectionException
throws
InvalidArgumentException

getExistingDocBlock()

Not that in case there are multiple doblocks for a class, the last one will be returned

public getExistingDocBlock() : bool|string

If we file old style generated docblocks we remove them

Return values
bool|string

getExistingTags()

public getExistingTags() : array<string|int, Tag>
Tags
throws
InvalidArgumentException
Return values
array<string|int, Tag>

getGeneratedDocBlock()

public getGeneratedDocBlock() : DocBlock|string
Tags
throws
LogicException
throws
InvalidArgumentException
Return values
DocBlock|string

getGeneratedTags()

public getGeneratedTags() : array<string|int, Tag>
Return values
array<string|int, Tag>

removeExistingSupportedTags()

Remove all existing tags that are supported by this module.

public removeExistingSupportedTags( $docBlock) : string

This will make sure that removed ORM properties and Extenions will not remain in the docblock, while providing the option to manually add docblocks like @author etc.

Parameters
$docBlock :
Return values
string

mergeGeneratedTagsIntoDocBlock()

protected mergeGeneratedTagsIntoDocBlock(string $existingDocBlock) : string
Parameters
$existingDocBlock : string
Tags
throws
LogicException
throws
InvalidArgumentException
Return values
string

        
On this page

Search results