$21 GRAYBYTE WORDPRESS FILE MANAGER $32

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/php55/usr/share/pear/Symfony/Component/HttpKernel/Profiler/

HOME
Current File : /opt/alt/php55/usr/share/pear/Symfony/Component/HttpKernel/Profiler//MemcachedProfilerStorage.php
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpKernel\Profiler;

/**
 * Memcached Profiler Storage
 *
 * @author Andrej Hudec <[email protected]>
 */
class MemcachedProfilerStorage extends BaseMemcacheProfilerStorage
{
    /**
     * @var \Memcached
     */
    private $memcached;

    /**
     * Internal convenience method that returns the instance of the Memcached
     *
     * @return \Memcached
     *
     * @throws \RuntimeException
     */
    protected function getMemcached()
    {
        if (null === $this->memcached) {
            if (!preg_match('#^memcached://(?(?=\[.*\])\[(.*)\]|(.*)):(.*)$#', $this->dsn, $matches)) {
                throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use Memcached with an invalid dsn "%s". The expected format is "memcached://[host]:port".', $this->dsn));
            }

            $host = $matches[1] ?: $matches[2];
            $port = $matches[3];

            $memcached = new \Memcached();

            // disable compression to allow appending
            $memcached->setOption(\Memcached::OPT_COMPRESSION, false);

            $memcached->addServer($host, $port);

            $this->memcached = $memcached;
        }

        return $this->memcached;
    }

    /**
     * Set instance of the Memcached
     *
     * @param \Memcached $memcached
     */
    public function setMemcached($memcached)
    {
        $this->memcached = $memcached;
    }

    /**
     * {@inheritdoc}
     */
    protected function getValue($key)
    {
        return $this->getMemcached()->get($key);
    }

    /**
     * {@inheritdoc}
     */
    protected function setValue($key, $value, $expiration = 0)
    {
        return $this->getMemcached()->set($key, $value, time() + $expiration);
    }

    /**
     * {@inheritdoc}
     */
    protected function delete($key)
    {
        return $this->getMemcached()->delete($key);
    }

    /**
     * {@inheritdoc}
     */
    protected function appendValue($key, $value, $expiration = 0)
    {
        $memcached = $this->getMemcached();

        if (!$result = $memcached->append($key, $value)) {
            return $memcached->set($key, $value, $expiration);
        }

        return $result;
    }
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
BaseMemcacheProfilerStorage.php
7.497 KB
18 Dec 2019 11.24 AM
root / root
0644
FileProfilerStorage.php
7.418 KB
18 Dec 2019 11.24 AM
root / root
0644
MemcacheProfilerStorage.php
2.549 KB
18 Dec 2019 11.24 AM
root / root
0644
MemcachedProfilerStorage.php
2.409 KB
18 Dec 2019 11.24 AM
root / root
0644
MongoDbProfilerStorage.php
6.855 KB
18 Dec 2019 11.24 AM
root / root
0644
MysqlProfilerStorage.php
2.336 KB
18 Dec 2019 11.24 AM
root / root
0644
PdoProfilerStorage.php
7.646 KB
18 Dec 2019 11.24 AM
root / root
0644
Profile.php
5.181 KB
18 Dec 2019 11.24 AM
root / root
0644
Profiler.php
7.263 KB
18 Dec 2019 11.24 AM
root / root
0644
ProfilerStorageInterface.php
1.48 KB
18 Dec 2019 11.24 AM
root / root
0644
RedisProfilerStorage.php
9.94 KB
18 Dec 2019 11.24 AM
root / root
0644
SqliteProfilerStorage.php
4.736 KB
18 Dec 2019 11.24 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF