ContentType
in package
implements
ContentTypeInterface
Class ContentType
This class represents the content type
Tags
Interfaces, Classes and Traits
- ContentTypeInterface
- Interface ContentTypeInterface
Table of Contents
- CONTENT = 'content'
- "Content" content type
- FILE = 'file'
- File content type
- LINK = 'link'
- Link content type
- $type : string
- Content type
- createForContent() : ContentType
- Create instance for "content" content type
- createForFile() : ContentType
- Create instance for file content type
- createForLink() : ContentType
- Create instance for link content type
- type() : string
- Return the content type
- __construct() : mixed
- ContentType constructor
Constants
CONTENT
"Content" content type
public
mixed
CONTENT
= 'content'
FILE
File content type
public
mixed
FILE
= 'file'
LINK
Link content type
public
mixed
LINK
= 'link'
Properties
$type
Content type
protected
string
$type
Methods
createForContent()
Create instance for "content" content type
public
static createForContent() : ContentType
Return values
ContentType —createForFile()
Create instance for file content type
public
static createForFile() : ContentType
Return values
ContentType —createForLink()
Create instance for link content type
public
static createForLink() : ContentType
Return values
ContentType —type()
Return the content type
public
type() : string
Return values
string —__construct()
ContentType constructor
protected
__construct(string $type) : mixed
Parameters
- $type : string
-
Content type