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

Public Member Functions

 __construct ($hex)
 
 asHtml ($linkResolver=null)
 
 asText ()
 
 getHexValue ()
 

Detailed Description

This class embodies a Color fragment.

Constructor & Destructor Documentation

§ __construct()

Prismic\Fragment\Color::__construct (   $hex)

Constructs a Color fragment.

Parameters
string$hexthe hexadecimal code of the color

Member Function Documentation

§ asHtml()

Prismic\Fragment\Color::asHtml (   $linkResolver = null)

Builds a HTML version of the color.

Parameters
\Prismic\LinkResolver$linkResolverthe link resolver
Returns
string the HTML version of the color

Implements Prismic\Fragment\FragmentInterface.

§ asText()

Prismic\Fragment\Color::asText ( )

Builds a text version of the color.

Returns
string the text version of the color

Implements Prismic\Fragment\FragmentInterface.

§ getHexValue()

Prismic\Fragment\Color::getHexValue ( )

Returns the hexadecimal code of the color.

Returns
string the hexadecimal code of the color

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