Documentation

Line
in package

FinalYes

This represents a line of a docblock.

Tags
author

Graham Campbell hello@gjcampbell.co.uk

Table of Contents

Properties

$content  : string
The content of this line.

Methods

__construct()  : mixed
Create a new line instance.
__toString()  : string
Get the string representation of object.
addBlank()  : void
Append a blank docblock line to this line's contents.
containsATag()  : bool
Does the line contain a tag?
containsUsefulContent()  : bool
Does this line contain useful content?
getContent()  : string
Get the content of this line.
isTheEnd()  : bool
Is the line the end of a docblock?
isTheStart()  : bool
Is the line the start of a docblock?
remove()  : void
Remove this line by clearing its contents.
setContent()  : void
Set the content of this line.

Properties

$content

The content of this line.

private string $content

Methods

__construct()

Create a new line instance.

public __construct(string $content) : mixed
Parameters
$content : string

__toString()

Get the string representation of object.

public __toString() : string
Return values
string

addBlank()

Append a blank docblock line to this line's contents.

public addBlank() : void

Note that this method technically brakes the internal state of the docblock, but is useful when we need to retain the indices of lines during the execution of an algorithm.

containsATag()

Does the line contain a tag?

public containsATag() : bool

If this is true, then it must be the first line of an annotation.

Return values
bool

containsUsefulContent()

Does this line contain useful content?

public containsUsefulContent() : bool

If the line contains text or tags, then this is true.

Return values
bool

getContent()

Get the content of this line.

public getContent() : string
Return values
string

isTheEnd()

Is the line the end of a docblock?

public isTheEnd() : bool
Return values
bool

isTheStart()

Is the line the start of a docblock?

public isTheStart() : bool
Return values
bool

remove()

Remove this line by clearing its contents.

public remove() : void

Note that this method technically brakes the internal state of the docblock, but is useful when we need to retain the indices of lines during the execution of an algorithm.

setContent()

Set the content of this line.

public setContent(string $content) : void
Parameters
$content : string

        
On this page

Search results