for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Borobudur-Http package.
*
* (c) Hexacodelabs <http://hexacodelabs.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Borobudur\Http\Header\Accept;
/**
* @author Iqbal Maulana <[email protected]>
* @created 7/18/15
class AcceptHeader extends AbstractAcceptHeader
{
* Regex that should match with format and sub format.
* Example: text/html, text/plain, application/json, etc.
const MATCHER = '#^([a-zA-Z+-]+|\*)/(\*|[a-zA-Z0-9+-]+)$#';
* Get header field name.
* @return string
public function getFieldName()
return 'Accept';
}
* Return regex rules.
protected function getFieldValueMatcher()
return self::MATCHER;