Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
php /
Symfony /
Component /
Cache /
Adapter /
Delete
Unzip
Name
Size
Permission
Date
Action
AbstractAdapter.php
8.44
KB
-rw-r--r--
2026-05-27 08:15
AbstractTagAwareAdapter.php
12.72
KB
-rw-r--r--
2026-05-27 08:15
AdapterInterface.php
993
B
-rw-r--r--
2026-05-27 08:15
ApcuAdapter.php
3.87
KB
-rw-r--r--
2026-05-27 08:15
ArrayAdapter.php
11.1
KB
-rw-r--r--
2026-05-27 08:15
ChainAdapter.php
9.14
KB
-rw-r--r--
2026-05-27 08:15
CouchbaseBucketAdapter.php
7.53
KB
-rw-r--r--
2026-05-27 08:15
CouchbaseCollectionAdapter.php
6.53
KB
-rw-r--r--
2026-05-27 08:15
DoctrineAdapter.php
2.78
KB
-rw-r--r--
2026-05-27 08:15
DoctrineDbalAdapter.php
17.08
KB
-rw-r--r--
2026-05-27 08:15
FilesystemAdapter.php
935
B
-rw-r--r--
2026-05-27 08:15
FilesystemTagAwareAdapter.php
7.41
KB
-rw-r--r--
2026-05-27 08:15
MemcachedAdapter.php
13.46
KB
-rw-r--r--
2026-05-27 08:15
NullAdapter.php
2.71
KB
-rw-r--r--
2026-05-27 08:15
ParameterNormalizer.php
898
B
-rw-r--r--
2026-05-27 08:15
PdoAdapter.php
21.01
KB
-rw-r--r--
2026-05-27 08:15
PhpArrayAdapter.php
12.31
KB
-rw-r--r--
2026-05-27 08:15
PhpFilesAdapter.php
10.03
KB
-rw-r--r--
2026-05-27 08:15
ProxyAdapter.php
8.27
KB
-rw-r--r--
2026-05-27 08:15
Psr16Adapter.php
1.86
KB
-rw-r--r--
2026-05-27 08:15
RedisAdapter.php
1.17
KB
-rw-r--r--
2026-05-27 08:15
RedisTagAwareAdapter.php
12.19
KB
-rw-r--r--
2026-05-27 08:15
TagAwareAdapter.php
11.21
KB
-rw-r--r--
2026-05-27 08:15
TagAwareAdapterInterface.php
769
B
-rw-r--r--
2026-05-27 08:15
TraceableAdapter.php
6.77
KB
-rw-r--r--
2026-05-27 08:15
TraceableTagAwareAdapter.php
926
B
-rw-r--r--
2026-05-27 08:15
Save
Rename
<?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\Cache\Adapter; use Couchbase\Bucket; use Couchbase\Cluster; use Couchbase\ClusterOptions; use Couchbase\Collection; use Couchbase\DocumentNotFoundException; use Couchbase\UpsertOptions; use Symfony\Component\Cache\Exception\CacheException; use Symfony\Component\Cache\Exception\InvalidArgumentException; use Symfony\Component\Cache\Marshaller\DefaultMarshaller; use Symfony\Component\Cache\Marshaller\MarshallerInterface; /** * @author Antonio Jose Cerezo Aranda <aj.cerezo@gmail.com> */ class CouchbaseCollectionAdapter extends AbstractAdapter { private const MAX_KEY_LENGTH = 250; /** @var Collection */ private $connection; private $marshaller; public function __construct(Collection $connection, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) { if (!static::isSupported()) { throw new CacheException('Couchbase >= 3.0.0 < 4.0.0 is required.'); } $this->maxIdLength = static::MAX_KEY_LENGTH; $this->connection = $connection; parent::__construct($namespace, $defaultLifetime); $this->enableVersioning(); $this->marshaller = $marshaller ?? new DefaultMarshaller(); } /** * @param array|string $dsn * * @return Bucket|Collection */ public static function createConnection($dsn, array $options = []) { if (\is_string($dsn)) { $dsn = [$dsn]; } elseif (!\is_array($dsn)) { throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be array or string, "%s" given.', __METHOD__, get_debug_type($dsn))); } if (!static::isSupported()) { throw new CacheException('Couchbase >= 3.0.0 < 4.0.0 is required.'); } set_error_handler(function ($type, $msg, $file, $line): bool { throw new \ErrorException($msg, 0, $type, $file, $line); }); $dsnPattern = '/^(?<protocol>couchbase(?:s)?)\:\/\/(?:(?<username>[^\:]+)\:(?<password>[^\@]{6,})@)?' .'(?<host>[^\:]+(?:\:\d+)?)(?:\/(?<bucketName>[^\/\?]+))(?:(?:\/(?<scopeName>[^\/]+))' .'(?:\/(?<collectionName>[^\/\?]+)))?(?:\/)?(?:\?(?<options>.*))?$/i'; $newServers = []; $protocol = 'couchbase'; try { $username = $options['username'] ?? ''; $password = $options['password'] ?? ''; foreach ($dsn as $server) { if (0 !== strpos($server, 'couchbase:')) { throw new InvalidArgumentException('Invalid Couchbase DSN: it does not start with "couchbase:".'); } preg_match($dsnPattern, $server, $matches); $username = $matches['username'] ?: $username; $password = $matches['password'] ?: $password; $protocol = $matches['protocol'] ?: $protocol; if (isset($matches['options'])) { $optionsInDsn = self::getOptions($matches['options']); foreach ($optionsInDsn as $parameter => $value) { $options[$parameter] = $value; } } $newServers[] = $matches['host']; } $option = isset($matches['options']) ? '?'.$matches['options'] : ''; $connectionString = $protocol.'://'.implode(',', $newServers).$option; $clusterOptions = new ClusterOptions(); $clusterOptions->credentials($username, $password); $client = new Cluster($connectionString, $clusterOptions); $bucket = $client->bucket($matches['bucketName']); $collection = $bucket->defaultCollection(); if (!empty($matches['scopeName'])) { $scope = $bucket->scope($matches['scopeName']); $collection = $scope->collection($matches['collectionName']); } return $collection; } finally { restore_error_handler(); } } public static function isSupported(): bool { return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '3.0.5', '>=') && version_compare(phpversion('couchbase'), '4.0', '<'); } private static function getOptions(string $options): array { $results = []; $optionsInArray = explode('&', $options); foreach ($optionsInArray as $option) { [$key, $value] = explode('=', $option); $results[$key] = $value; } return $results; } /** * {@inheritdoc} */ protected function doFetch(array $ids): array { $results = []; foreach ($ids as $id) { try { $resultCouchbase = $this->connection->get($id); } catch (DocumentNotFoundException $exception) { continue; } $content = $resultCouchbase->value ?? $resultCouchbase->content(); $results[$id] = $this->marshaller->unmarshall($content); } return $results; } /** * {@inheritdoc} */ protected function doHave($id): bool { return $this->connection->exists($id)->exists(); } /** * {@inheritdoc} */ protected function doClear($namespace): bool { return false; } /** * {@inheritdoc} */ protected function doDelete(array $ids): bool { $idsErrors = []; foreach ($ids as $id) { try { $result = $this->connection->remove($id); if (null === $result->mutationToken()) { $idsErrors[] = $id; } } catch (DocumentNotFoundException $exception) { } } return 0 === \count($idsErrors); } /** * {@inheritdoc} */ protected function doSave(array $values, $lifetime) { if (!$values = $this->marshaller->marshall($values, $failed)) { return $failed; } $upsertOptions = new UpsertOptions(); $upsertOptions->expiry($lifetime); $ko = []; foreach ($values as $key => $value) { try { $this->connection->upsert($key, $value, $upsertOptions); } catch (\Exception $exception) { $ko[$key] = ''; } } return [] === $ko ? true : $ko; } }