403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/air-sport_cz/www/vendor/friendsofsymfony/jsrouting-bundle/Util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/air-sport_cz/www/vendor/friendsofsymfony/jsrouting-bundle/Util/CacheControlConfig.php
<?php

/*
 * This file is part of the FOSJsRoutingBundle package.
 *
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace FOS\JsRoutingBundle\Util;

use Symfony\Component\HttpFoundation\Response;

class CacheControlConfig
{
    /**
     * @var array
     */
    private $parameters;

    public function __construct(array $parameters = array())
    {
        $this->parameters = $parameters;
    }

    /**
     * @param Response $response
     */
    public function apply(Response $response)
    {
        if (empty($this->parameters['enabled'])) {
            return;
        }

        $this->parameters['public'] ? $response->setPublic() : $response->setPrivate();

        if (is_integer($this->parameters['maxage'])) {
            $response->setMaxAge($this->parameters['maxage']);
        }

        if (is_integer($this->parameters['smaxage'])) {
            $response->setSharedMaxAge($this->parameters['smaxage']);
        }

        if ($this->parameters['expires'] !== null) {
            $response->setExpires(new \DateTime($this->parameters['expires']));
        }

        if (!empty($this->parameters['vary'])) {
            $response->setVary($this->parameters['vary']);
        }
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit