ICanBoogie/HTTP v2.6.0
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Exception
    • HTTP
      • Headers
      • Request
      • RequestDispatcher

Classes

  • CacheControl
  • ContentDisposition
  • ContentType
  • Date
  • Header
  • HeaderParameter

Class ContentType

Representation of the Content-Type header field.

<?php

use ICanBoogie\HTTP\Headers\ContentType;

$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\Headers\Header implements ArrayAccess
Extended by ICanBoogie\HTTP\Headers\ContentType
Namespace: ICanBoogie\HTTP\Headers
See: http://tools.ietf.org/html/rfc2616#section-14.17
Located at Headers/ContentType.php

Methods summary

public
# __construct( string $value = null, array $attributes = [] )

Defines the charset parameter.

Defines the charset parameter.

Parameters

$value
$attributes
$parameters

Inheritdoc

Overrides

ICanBoogie\HTTP\Headers\Header::__construct

Methods inherited from ICanBoogie\HTTP\Headers\Header

__get(), __set(), __toString(), __unset(), from(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), parse()

Constants summary

Constants inherited from ICanBoogie\HTTP\Headers\Header

VALUE_ALIAS

Properties summary

Properties inherited from ICanBoogie\HTTP\Headers\Header

$parameters, $value

Magic properties

public $type

string Media type of the entity-body.

public $charset

string Charset of the entity-body.

ICanBoogie/HTTP v2.6.0 API documentation generated by ApiGen