update v1.0.7.9 R.C.
This is a Release Candidate. We are still testing.
This commit is contained in:
113
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/AbstractFieldValuePart.php
vendored
Normal file
113
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/AbstractFieldValuePart.php
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Http\Header\Accept\FieldValuePart;
|
||||
|
||||
/**
|
||||
* Field Value Part
|
||||
*
|
||||
*
|
||||
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
|
||||
*/
|
||||
abstract class AbstractFieldValuePart
|
||||
{
|
||||
/**
|
||||
* Internal object used for value retrieval
|
||||
* @var object
|
||||
*/
|
||||
private $internalValues;
|
||||
|
||||
/**
|
||||
* A Field Value Part this Field Value Part matched against.
|
||||
* @var AbstractFieldValuePart
|
||||
*/
|
||||
protected $matchedAgainst;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param object $internalValues
|
||||
*/
|
||||
public function __construct($internalValues)
|
||||
{
|
||||
$this->internalValues = $internalValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a Field Value Part this Field Value Part matched against.
|
||||
*
|
||||
* @param AbstractFieldValuePart $matchedAgainst
|
||||
* @return AbstractFieldValuePart provides fluent interface
|
||||
*/
|
||||
public function setMatchedAgainst(AbstractFieldValuePart $matchedAgainst)
|
||||
{
|
||||
$this->matchedAgainst = $matchedAgainst;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Field Value Part this Field Value Part matched against.
|
||||
*
|
||||
* @return AbstractFieldValuePart|null
|
||||
*/
|
||||
public function getMatchedAgainst()
|
||||
{
|
||||
return $this->matchedAgainst;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return object
|
||||
*/
|
||||
protected function getInternalValues()
|
||||
{
|
||||
return $this->internalValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $typeString
|
||||
*/
|
||||
public function getTypeString()
|
||||
{
|
||||
return $this->getInternalValues()->typeString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float $priority
|
||||
*/
|
||||
public function getPriority()
|
||||
{
|
||||
return (float) $this->getInternalValues()->priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \stdClass $params
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return (object) $this->getInternalValues()->params;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $raw
|
||||
*/
|
||||
public function getRaw()
|
||||
{
|
||||
return $this->getInternalValues()->raw;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param mixed
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($key)
|
||||
{
|
||||
return $this->getInternalValues()->$key;
|
||||
}
|
||||
}
|
||||
43
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/AcceptFieldValuePart.php
vendored
Normal file
43
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/AcceptFieldValuePart.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Http\Header\Accept\FieldValuePart;
|
||||
|
||||
/**
|
||||
* Field Value Part
|
||||
*
|
||||
*
|
||||
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
|
||||
*/
|
||||
class AcceptFieldValuePart extends AbstractFieldValuePart
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSubtype()
|
||||
{
|
||||
return $this->getInternalValues()->subtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSubtypeRaw()
|
||||
{
|
||||
return $this->getInternalValues()->subtypeRaw;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFormat()
|
||||
{
|
||||
return $this->getInternalValues()->format;
|
||||
}
|
||||
}
|
||||
28
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/CharsetFieldValuePart.php
vendored
Normal file
28
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/CharsetFieldValuePart.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Http\Header\Accept\FieldValuePart;
|
||||
|
||||
/**
|
||||
* Field Value Part
|
||||
*
|
||||
*
|
||||
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
|
||||
*/
|
||||
class CharsetFieldValuePart extends AbstractFieldValuePart
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCharset()
|
||||
{
|
||||
return $this->getInternalValues()->type;
|
||||
}
|
||||
}
|
||||
28
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/EncodingFieldValuePart.php
vendored
Normal file
28
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/EncodingFieldValuePart.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Http\Header\Accept\FieldValuePart;
|
||||
|
||||
/**
|
||||
* Field Value Part
|
||||
*
|
||||
*
|
||||
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
|
||||
*/
|
||||
class EncodingFieldValuePart extends AbstractFieldValuePart
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEncoding()
|
||||
{
|
||||
return $this->getInternalValues()->type;
|
||||
}
|
||||
}
|
||||
34
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/LanguageFieldValuePart.php
vendored
Normal file
34
vendor/zendframework/zend-http/src/Header/Accept/FieldValuePart/LanguageFieldValuePart.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Zend Framework (http://framework.zend.com/)
|
||||
*
|
||||
* @link http://github.com/zendframework/zf2 for the canonical source repository
|
||||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
|
||||
namespace Zend\Http\Header\Accept\FieldValuePart;
|
||||
|
||||
/**
|
||||
* Field Value Part
|
||||
*
|
||||
*
|
||||
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
|
||||
*/
|
||||
class LanguageFieldValuePart extends AbstractFieldValuePart
|
||||
{
|
||||
public function getLanguage()
|
||||
{
|
||||
return $this->getInternalValues()->typeString;
|
||||
}
|
||||
|
||||
public function getPrimaryTag()
|
||||
{
|
||||
return $this->getInternalValues()->type;
|
||||
}
|
||||
|
||||
public function getSubTag()
|
||||
{
|
||||
return $this->getInternalValues()->subtype;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user