Class ContentTypeHeader
Representation of the Content-Type header field.
<?php
use ICanBoogie\HTTP\ContentTypeHeader;
$ct = new ContentType;
$ct->type = "text/html";
$ct->charset = "utf-8";
echo $ct; // text/html; charset=utf-8
$ct = ContentType::from("text/plain; charset=iso-8859-1");
echo $ct->type; // text/plain
echo $ct->charset; // iso-8859-1
- ICanBoogie\HTTP\Header implements ArrayAccess
-
ICanBoogie\HTTP\ContentTypeHeader
Namespace: ICanBoogie\HTTP
See: http://tools.ietf.org/html/rfc2616#section-14.17
Located at vendor/icanboogie/http/lib/headers/content-type.php
See: http://tools.ietf.org/html/rfc2616#section-14.17
Located at vendor/icanboogie/http/lib/headers/content-type.php
Methods summary
public
|
Methods inherited from ICanBoogie\HTTP\Header
__get(),
__set(),
__toString(),
__unset(),
from(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
parse()
Magic methods summary
Constants summary
Constants inherited from ICanBoogie\HTTP\Header
Properties summary
Properties inherited from ICanBoogie\HTTP\Header
Magic properties
public
mixed
|
$type | |
#
string Media type of the entity-body. |
public
mixed
|
$charset | |
#
string Charset of the entity-body. |