X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/realesbar/vendor/symfony/http-foundation
home
/
gfecatvj
/
sites
/
realesbar
/
vendor
/
symfony
/
http-foundation
/
π
..
π
AcceptHeader.php
(3.55 KB)
π
AcceptHeaderItem.php
(3.36 KB)
π
BinaryFileResponse.php
(11.78 KB)
π
CHANGELOG.md
(13.59 KB)
π
Cookie.php
(10.97 KB)
π
Exception
π
ExpressionRequestMatcher.php
(1.32 KB)
π
File
π
FileBag.php
(3.86 KB)
π
HeaderBag.php
(7.23 KB)
π
HeaderUtils.php
(7.15 KB)
π
InputBag.php
(3.47 KB)
π
IpUtils.php
(5.44 KB)
π
JsonResponse.php
(7.17 KB)
π
LICENSE
(1.04 KB)
π
ParameterBag.php
(5.39 KB)
π
README.md
(531 B)
π
RedirectResponse.php
(3 KB)
π
Request.php
(64.33 KB)
π
RequestMatcher.php
(4.48 KB)
π
RequestMatcherInterface.php
(687 B)
π
RequestStack.php
(2.31 KB)
π
Response.php
(35.98 KB)
π
ResponseHeaderBag.php
(7.82 KB)
π
ServerBag.php
(3.95 KB)
π
Session
π
StreamedResponse.php
(3.07 KB)
π
Test
π
UrlHelper.php
(3.03 KB)
π
composer.json
(1.16 KB)
Editing: AcceptHeaderItem.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpFoundation; /** * Represents an Accept-* header item. * * @author Jean-FranΓ§ois Simon <contact@jfsimon.fr> */ class AcceptHeaderItem { private $value; private $quality = 1.0; private $index = 0; private $attributes = []; public function __construct(string $value, array $attributes = []) { $this->value = $value; foreach ($attributes as $name => $value) { $this->setAttribute($name, $value); } } /** * Builds an AcceptHeaderInstance instance from a string. * * @return self */ public static function fromString(?string $itemValue) { $parts = HeaderUtils::split($itemValue ?? '', ';='); $part = array_shift($parts); $attributes = HeaderUtils::combine($parts); return new self($part[0], $attributes); } /** * Returns header value's string representation. * * @return string */ public function __toString() { $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : ''); if (\count($this->attributes) > 0) { $string .= '; '.HeaderUtils::toString($this->attributes, ';'); } return $string; } /** * Set the item value. * * @return $this */ public function setValue(string $value) { $this->value = $value; return $this; } /** * Returns the item value. * * @return string */ public function getValue() { return $this->value; } /** * Set the item quality. * * @return $this */ public function setQuality(float $quality) { $this->quality = $quality; return $this; } /** * Returns the item quality. * * @return float */ public function getQuality() { return $this->quality; } /** * Set the item index. * * @return $this */ public function setIndex(int $index) { $this->index = $index; return $this; } /** * Returns the item index. * * @return int */ public function getIndex() { return $this->index; } /** * Tests if an attribute exists. * * @return bool */ public function hasAttribute(string $name) { return isset($this->attributes[$name]); } /** * Returns an attribute by its name. * * @param mixed $default * * @return mixed */ public function getAttribute(string $name, $default = null) { return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; } /** * Returns all attributes. * * @return array */ public function getAttributes() { return $this->attributes; } /** * Set an attribute. * * @return $this */ public function setAttribute(string $name, string $value) { if ('q' === $name) { $this->quality = (float) $value; } else { $this->attributes[$name] = $value; } return $this; } }
Upload File
Create Folder