Neomerx\JsonApi\Contracts\Http\Headers\MediaTypeInterface::getType PHP Метод

getType() публичный Метод

Get media type (no subtype).
public getType ( ) : string
Результат string
    public function getType();

Usage Example

Пример #1
0
 /**
  * @param MediaTypeInterface $mediaType
  *
  * @return bool
  */
 private function isTypeEquals(MediaTypeInterface $mediaType)
 {
     // Type, subtype and param name should be compared case-insensitive
     // https://tools.ietf.org/html/rfc7231#section-3.1.1.1
     return strcasecmp($this->getType(), $mediaType->getType()) === 0;
 }