Civil Date PHP Package

TextElement
in package
implements PatternElement

FinalYes

Represents literal text in a date pattern.

Tags
see
PatternElement
PatternCompiler::compile()

Table of Contents

Interfaces

PatternElement
Represents an element in a compiled date pattern.

Methods

__construct()  : mixed
Creates a date-pattern text element.
appended()  : self
Returns an element with appended literal text.
format()  : string
Formats this element for a date.
text()  : string
Returns the literal text.

Methods

__construct()

Creates a date-pattern text element.

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

Literal text.

appended()

Returns an element with appended literal text.

public appended(string $text) : self
Parameters
$text : string

Text to append.

Return values
self

Element containing both text fragments.

text()

Returns the literal text.

public text() : string
Return values
string

Literal text.

On this page

Search results