Prismic.io PHP kit  3.0.0
Public Member Functions | List of all members
Prismic\Fragment\Span\HyperlinkSpan Class Reference
Inheritance diagram for Prismic\Fragment\Span\HyperlinkSpan:
Prismic\Fragment\Span\SpanInterface

Public Member Functions

 __construct ($start, $end, $link, $label=NULL)
 
 getStart ()
 
 getEnd ()
 
 getLink ()
 
 getLabel ()
 

Detailed Description

This class embodies a link span. A span comes in a array of spans, which is served with a raw text. If the raw text is "Hello world!", and the HyperlinkSpan's start is 6 and its end is 11, then the piece that is meant to be the hypertext is "world".

Constructor & Destructor Documentation

§ __construct()

Prismic\Fragment\Span\HyperlinkSpan::__construct (   $start,
  $end,
  $link,
  $label = NULL 
)

Constructs a link span

Parameters
int$startthe start of the span
int$endthe end of the span
LinkInterface$linkthe link to point to
string$labelcan be null

Member Function Documentation

§ getEnd()

Prismic\Fragment\Span\HyperlinkSpan::getEnd ( )

Returns the end of the span

Returns
int the end of the span

§ getLabel()

Prismic\Fragment\Span\HyperlinkSpan::getLabel ( )

Returns the label

Returns
string the label

§ getLink()

Prismic\Fragment\Span\HyperlinkSpan::getLink ( )

Returns the link to point to

Returns
LinkInterface the link to point to

§ getStart()

Prismic\Fragment\Span\HyperlinkSpan::getStart ( )

Returns the start of the span

Returns
int the start of the span

The documentation for this class was generated from the following file: