* @since 2.0
*/
class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param array|null $options
*
* @throws PDOException in case of an error.
*/
public function __construct($dsn, $user = null, $password = null, array $options = null)
{
try {
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function getServerVersion()
{
/**
* PDO implementation of the Connection interface.
* Used by all PDO-based drivers.
*
* @since 2.0
*/
class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param array|null $options
*
* @throws PDOException in case of an error.
*/
public function __construct($dsn, $user = null, $password = null, array $options = null)
{
try {
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
/**
* PDO implementation of the Connection interface.
* Used by all PDO-based drivers.
*
* @since 2.0
*/
class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param array|null $options
*
* @throws PDOException in case of an error.
*/
public function __construct($dsn, $user = null, $password = null, array $options = null)
{
try {
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
* {@inheritdoc}
*/
public function exec($statement)
{
try {
return parent::exec($statement);
} catch (\PDOException $exception) {
throw new PDOException($exception);
}
}
/**
use PDO;
/**
* PDO implementation of the Connection interface.
* Used by all PDO-based drivers.
*
* @since 2.0
*/
class PDOConnection extends \Doctrine\DBAL\Driver\PDOConnection
{
/**
* @param string $dsn
* @param string|null $user
* @param string|null $password
* @param array|null $options
*/
public function __construct($dsn, $user = null, $password = null, array $options = null)
{
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Concrete\Core\Database\Driver\PDOStatement', array()));
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
}
<?php
namespace Concrete\Core\Database\Driver\PDOMySqlConcrete5;
use Concrete\Core\Database\Connection\PDOConnection;
use Concrete\Core\Database\Platforms\MySQL80Platform;
use Concrete\Core\Database\Schema\MySqlSchemaManager;
/**
* PDO MySql driver.
*
* @since 2.0
*/
class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver
{
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
{
$conn = new PDOConnection(
$this->_constructPdoDsn($params),
$username,
$password,
$driverOptions
);
return $conn;
}
/**
* {@inheritdoc}
*
* @see \Doctrine\DBAL\Driver\AbstractMySQLDriver::createDatabasePlatformForVersion()
*/
public function createDatabasePlatformForVersion($version)
{
if (false === stripos($version, 'mariadb')) {
if (preg_match('/^(\d+)/', $version, $match)) {
if ((int) $match[1] >= 8) {
return new MySQL80Platform();
}
}
}
return $this->_expr;
}
/**
* Establishes the connection with the database.
*
* @return boolean TRUE if the connection was successfully established, FALSE if
* the connection is already open.
*/
public function connect()
{
if ($this->_isConnected) return false;
$driverOptions = isset($this->_params['driverOptions']) ?
$this->_params['driverOptions'] : array();
$user = isset($this->_params['user']) ? $this->_params['user'] : null;
$password = isset($this->_params['password']) ?
$this->_params['password'] : null;
$this->_conn = $this->_driver->connect($this->_params, $user, $password, $driverOptions);
$this->_isConnected = true;
if (null === $this->platform) {
$this->detectDatabasePlatform();
}
if (false === $this->autoCommit) {
$this->beginTransaction();
}
if ($this->_eventManager->hasListeners(Events::postConnect)) {
$eventArgs = new Event\ConnectionEventArgs($this);
$this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);
}
return true;
}
/**
* Detects and sets the database platform.
* or the underlying driver connection cannot determine the platform
* version without having to query it (performance reasons).
*
* @return string|null
*/
private function getDatabasePlatformVersion()
{
// Driver does not support version specific platforms.
if ( ! $this->_driver instanceof VersionAwarePlatformDriver) {
return null;
}
// Explicit platform version requested (supersedes auto-detection).
if (isset($this->_params['serverVersion'])) {
return $this->_params['serverVersion'];
}
// If not connected, we need to connect now to determine the platform version.
if (null === $this->_conn) {
$this->connect();
}
// Automatic platform version detection.
if ($this->_conn instanceof ServerInfoAwareConnection &&
! $this->_conn->requiresQueryForServerVersion()
) {
return $this->_conn->getServerVersion();
}
// Unable to detect platform version.
return null;
}
/**
* Returns the current auto-commit mode for this connection.
*
* @return boolean True if auto-commit mode is currently enabled for this connection, false otherwise.
*
* @see setAutoCommit
*/
if ($this->_eventManager->hasListeners(Events::postConnect)) {
$eventArgs = new Event\ConnectionEventArgs($this);
$this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);
}
return true;
}
/**
* Detects and sets the database platform.
*
* Evaluates custom platform class and version in order to set the correct platform.
*
* @throws DBALException if an invalid platform was specified for this connection.
*/
private function detectDatabasePlatform()
{
if ( ! isset($this->_params['platform'])) {
$version = $this->getDatabasePlatformVersion();
if (null !== $version) {
$this->platform = $this->_driver->createDatabasePlatformForVersion($version);
} else {
$this->platform = $this->_driver->getDatabasePlatform();
}
} elseif ($this->_params['platform'] instanceof Platforms\AbstractPlatform) {
$this->platform = $this->_params['platform'];
} else {
throw DBALException::invalidPlatformSpecified();
}
$this->platform->setEventManager($this->_eventManager);
}
/**
* Returns the version of the related platform if applicable.
*
* Returns null if either the driver is not capable to create version
* specific platform instances, no explicit server version was specified
/**
* Gets the EventManager used by the Connection.
*
* @return \Doctrine\Common\EventManager
*/
public function getEventManager()
{
return $this->_eventManager;
}
/**
* Gets the DatabasePlatform for the connection.
*
* @return \Doctrine\DBAL\Platforms\AbstractPlatform
*/
public function getDatabasePlatform()
{
if (null == $this->platform) {
$this->detectDatabasePlatform();
}
return $this->platform;
}
/**
* Gets the ExpressionBuilder for the connection.
*
* @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder
*/
public function getExpressionBuilder()
{
return $this->_expr;
}
/**
* Establishes the connection with the database.
*
* @return boolean TRUE if the connection was successfully established, FALSE if
* the connection is already open.
if (!isset($params['driverOptions'])) {
$params['driverOptions'] = [];
}
if (defined('PDO::MYSQL_ATTR_MULTI_STATEMENTS')) {
$params['driverOptions'][\PDO::MYSQL_ATTR_MULTI_STATEMENTS] = false;
}
$params['wrapperClass'] = array_get($config, 'wrapperClass', '\Concrete\Core\Database\Connection\Connection');
unset($params['driver']);
$wrapperClass = 'Doctrine\DBAL\Connection';
if (isset($params['wrapperClass'])) {
if (is_subclass_of($params['wrapperClass'], $wrapperClass)) {
$wrapperClass = $params['wrapperClass'];
} else {
throw DBALException::invalidWrapperClass($params['wrapperClass']);
}
}
$connection = new $wrapperClass($params, $driver);
$connection->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array');
return $connection;
}
/**
* @param $config
* @param $name
*
* @return \Doctrine\DBAL\Connection
*
* @throws DBALException
*/
public function make($config, $name)
{
return $this->createConnection($config);
}
/**
* @return DriverManager
*/
public function getDriverManager()
throw DBALException::invalidWrapperClass($params['wrapperClass']);
}
}
$connection = new $wrapperClass($params, $driver);
$connection->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array');
return $connection;
}
/**
* @param $config
* @param $name
*
* @return \Doctrine\DBAL\Connection
*
* @throws DBALException
*/
public function make($config, $name)
{
return $this->createConnection($config);
}
/**
* @return DriverManager
*/
public function getDriverManager()
{
return $this->driver_manager;
}
}
{
$config = $this->getConfig($name);
// First we will check by the connection name to see if an extension has been
// registered specifically for that connection. If it has we will call the
// Closure and pass it the config allowing it to resolve the connection.
if (isset($this->extensions[$name])) {
return call_user_func($this->extensions[$name], $config, $name);
}
$driver = $config['driver'];
// Next we will check to see if an extension has been registered for a driver
// and will call the Closure if so, which allows us to have a more generic
// resolver for the drivers themselves which applies to all connections.
if (isset($this->extensions[$driver])) {
return call_user_func($this->extensions[$driver], $config, $name);
}
return $this->factory->make($config, $name);
}
/**
* Prepare the database connection instance.
*
* @param Connection $connection
*
* @return Connection
*/
protected function prepare($connection)
{
return $connection;
}
/**
* Get the configuration for a connection.
*
* @param string $name
*
* @return array
public function get()
{
return $this->connection();
}
/**
* Get a database connection instance.
*
* @param string $name
*
* @return \Concrete\Core\Database\Connection\Connection
*/
public function connection($name = null)
{
$name = $name ?: $this->getDefaultConnection();
// If we haven't created this connection, we'll create it based on the config
// provided in the application. Once we've created the connections we will
// set the "fetch mode" for PDO which determines the query return types.
if (!isset($this->connections[$name])) {
$connection = $this->makeConnection($name);
$this->connections[$name] = $this->prepare($connection);
}
return $this->connections[$name];
}
/**
* Disconnect from the given database and remove from local cache.
*
* @param string $name
*/
public function purge($name = null)
{
$this->disconnect($name);
if (isset($this->connections[$name = $name ?: $this->getDefaultConnection()])) {
unset($this->connections[$name]);
}
}
/**
$this->app->singleton('Concrete\Core\Database\DatabaseManagerORM');
// Bind both `database` and `database/orm` to their respective classes
$this->app->bind('database', 'Concrete\Core\Database\DatabaseManager');
$this->app->bind('database/orm',
'Concrete\Core\Database\DatabaseManagerORM');
// Bind a constructor for our DriverManager bootstrapped from config
$this->app->bind('Concrete\Core\Database\Driver\DriverManager',
function ($app) {
$manager = new DriverManager($app);
$manager->configExtensions($app->make('config')->get('database.drivers'));
return $manager;
});
// Bind default connection resolver
$this->app->bind('Concrete\Core\Database\Connection\Connection',
function ($app) {
return $app->make('Concrete\Core\Database\DatabaseManager')->connection();
});
$this->app->bind('Doctrine\DBAL\Connection',
'Concrete\Core\Database\Connection\Connection');
$this->app->alias('Concrete\Core\Database\Connection\Connection', 'database/connection');
// Bind EntityManager factory
$this->app->bind('Concrete\Core\Database\EntityManagerConfigFactory',
function($app) {
$config = $app->make('Doctrine\ORM\Configuration');
$configRepository = $app->make('config');
return new EntityManagerConfigFactory($app, $config, $configRepository);
});
$this->app->bind('Concrete\Core\Database\EntityManagerConfigFactoryInterface',
'Concrete\Core\Database\EntityManagerConfigFactory');
$this->app->bind('Concrete\Core\Database\EntityManagerFactory',
function ($app) {
$configFactory = $app->make('Concrete\Core\Database\EntityManagerConfigFactory');
return [];
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function build($concrete, array $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure) {
return $concrete($this, $parameters);
}
$reflector = new ReflectionClass($concrete);
// If the type is not instantiable, the developer is attempting to resolve
// an abstract type such as an Interface of Abstract Class and there is
// no binding registered for the abstractions so we need to bail out.
if (! $reflector->isInstantiable()) {
if (! empty($this->buildStack)) {
$previous = implode(', ', $this->buildStack);
$message = "Target [$concrete] is not instantiable while building [$previous].";
} else {
$message = "Target [$concrete] is not instantiable.";
}
throw new BindingResolutionException($message);
}
$this->buildStack[] = $concrete;
$args = $this->isRunThroughCommandLineInterface() && isset($_SERVER['argv']) ? $_SERVER['argv'] : null;
$detector = new EnvironmentDetector();
return $this->environment = $detector->detect($environments, $args);
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*
* @return mixed
*/
public function build($concrete, array $parameters = [])
{
$object = parent::build($concrete, $parameters);
if (is_object($object)) {
if ($object instanceof ApplicationAwareInterface) {
$object->setApplication($this);
}
if ($object instanceof LoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger($object->getLoggerChannel());
$object->setLogger($logger);
} elseif ($object instanceof PsrLoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger(Channels::CHANNEL_APPLICATION);
$object->setLogger($logger);
}
}
return $object;
}
/**
* @return RuntimeInterface
*/
* @return mixed
*/
public function make($abstract, array $parameters = [])
{
$abstract = $this->getAlias($this->normalize($abstract));
// If an instance of the type is currently being managed as a singleton we'll
// just return an existing instance instead of instantiating new instances
// so the developer can keep using the same objects instance every time.
if (isset($this->instances[$abstract])) {
return $this->instances[$abstract];
}
$concrete = $this->getConcrete($abstract);
// We're ready to instantiate an instance of the concrete type registered for
// the binding. This will instantiate the types, as well as resolve any of
// its "nested" dependencies recursively until all have gotten resolved.
if ($this->isBuildable($concrete, $abstract)) {
$object = $this->build($concrete, $parameters);
} else {
$object = $this->make($concrete, $parameters);
}
// If we defined any extenders for this type, we'll need to spin through them
// and apply them to the object being built. This allows for the extension
// of services, such as changing configuration or decorating the object.
foreach ($this->getExtenders($abstract) as $extender) {
$object = $extender($object, $this);
}
// If the requested type is registered as a singleton we'll want to cache off
// the instances in "memory" so we can return it later without creating an
// entirely new instance of an object on each subsequent request for it.
if ($this->isShared($abstract)) {
$this->instances[$abstract] = $object;
}
$this->fireResolvingCallbacks($abstract, $object);
$configRepository = $app->make('config');
return new EntityManagerConfigFactory($app, $config, $configRepository);
});
$this->app->bind('Concrete\Core\Database\EntityManagerConfigFactoryInterface',
'Concrete\Core\Database\EntityManagerConfigFactory');
$this->app->bind('Concrete\Core\Database\EntityManagerFactory',
function ($app) {
$configFactory = $app->make('Concrete\Core\Database\EntityManagerConfigFactory');
return new EntityManagerFactory($configFactory);
});
$this->app->bind('Concrete\Core\Database\EntityManagerFactoryInterface',
'Concrete\Core\Database\EntityManagerFactory');
// Bind default entity manager resolver
$this->app->singleton('Doctrine\ORM\EntityManager',
function ($app) {
$factory = $app->make('Concrete\Core\Database\EntityManagerFactory');
$entityManager = $factory->create($app->make('Concrete\Core\Database\Connection\Connection'));
return $entityManager;
});
$this->app->bind('Doctrine\ORM\EntityManagerInterface',
'Doctrine\ORM\EntityManager');
// ------------------------------------------
// Bind Doctrine EntityManager setup classes
$this->app->bind('Doctrine\Common\Cache\ArrayCache',
function() {
return new \Doctrine\Common\Cache\ArrayCache();
});
$this->app->bind('Doctrine\Common\Annotations\AnnotationReader',
function() {
return new \Doctrine\Common\Annotations\AnnotationReader();
});
$this->app->bind('Doctrine\Common\Annotations\SimpleAnnotationReader',
function() {
return new \Doctrine\Common\Annotations\SimpleAnnotationReader();
});
$this->app->bind('Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain',
return [];
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function build($concrete, array $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure) {
return $concrete($this, $parameters);
}
$reflector = new ReflectionClass($concrete);
// If the type is not instantiable, the developer is attempting to resolve
// an abstract type such as an Interface of Abstract Class and there is
// no binding registered for the abstractions so we need to bail out.
if (! $reflector->isInstantiable()) {
if (! empty($this->buildStack)) {
$previous = implode(', ', $this->buildStack);
$message = "Target [$concrete] is not instantiable while building [$previous].";
} else {
$message = "Target [$concrete] is not instantiable.";
}
throw new BindingResolutionException($message);
}
$this->buildStack[] = $concrete;
$args = $this->isRunThroughCommandLineInterface() && isset($_SERVER['argv']) ? $_SERVER['argv'] : null;
$detector = new EnvironmentDetector();
return $this->environment = $detector->detect($environments, $args);
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*
* @return mixed
*/
public function build($concrete, array $parameters = [])
{
$object = parent::build($concrete, $parameters);
if (is_object($object)) {
if ($object instanceof ApplicationAwareInterface) {
$object->setApplication($this);
}
if ($object instanceof LoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger($object->getLoggerChannel());
$object->setLogger($logger);
} elseif ($object instanceof PsrLoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger(Channels::CHANNEL_APPLICATION);
$object->setLogger($logger);
}
}
return $object;
}
/**
* @return RuntimeInterface
*/
* @return mixed
*/
public function make($abstract, array $parameters = [])
{
$abstract = $this->getAlias($this->normalize($abstract));
// If an instance of the type is currently being managed as a singleton we'll
// just return an existing instance instead of instantiating new instances
// so the developer can keep using the same objects instance every time.
if (isset($this->instances[$abstract])) {
return $this->instances[$abstract];
}
$concrete = $this->getConcrete($abstract);
// We're ready to instantiate an instance of the concrete type registered for
// the binding. This will instantiate the types, as well as resolve any of
// its "nested" dependencies recursively until all have gotten resolved.
if ($this->isBuildable($concrete, $abstract)) {
$object = $this->build($concrete, $parameters);
} else {
$object = $this->make($concrete, $parameters);
}
// If we defined any extenders for this type, we'll need to spin through them
// and apply them to the object being built. This allows for the extension
// of services, such as changing configuration or decorating the object.
foreach ($this->getExtenders($abstract) as $extender) {
$object = $extender($object, $this);
}
// If the requested type is registered as a singleton we'll want to cache off
// the instances in "memory" so we can return it later without creating an
// entirely new instance of an object on each subsequent request for it.
if ($this->isShared($abstract)) {
$this->instances[$abstract] = $object;
}
$this->fireResolvingCallbacks($abstract, $object);
// rebound listener so that any objects which have already gotten resolved
// can have their copy of the object updated via the listener callbacks.
if ($this->resolved($abstract)) {
$this->rebound($abstract);
}
}
/**
* Get the Closure to be used when building a type.
*
* @param string $abstract
* @param string $concrete
* @return \Closure
*/
protected function getClosure($abstract, $concrete)
{
return function ($c, $parameters = []) use ($abstract, $concrete) {
$method = ($abstract == $concrete) ? 'build' : 'make';
return $c->$method($concrete, $parameters);
};
}
/**
* Add a contextual binding to the container.
*
* @param string $concrete
* @param string $abstract
* @param \Closure|string $implementation
* @return void
*/
public function addContextualBinding($concrete, $abstract, $implementation)
{
$this->contextual[$this->normalize($concrete)][$this->normalize($abstract)] = $this->normalize($implementation);
}
/**
* Register a binding if it hasn't already been registered.
*
* @param string $abstract
return [];
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
public function build($concrete, array $parameters = [])
{
// If the concrete type is actually a Closure, we will just execute it and
// hand back the results of the functions, which allows functions to be
// used as resolvers for more fine-tuned resolution of these objects.
if ($concrete instanceof Closure) {
return $concrete($this, $parameters);
}
$reflector = new ReflectionClass($concrete);
// If the type is not instantiable, the developer is attempting to resolve
// an abstract type such as an Interface of Abstract Class and there is
// no binding registered for the abstractions so we need to bail out.
if (! $reflector->isInstantiable()) {
if (! empty($this->buildStack)) {
$previous = implode(', ', $this->buildStack);
$message = "Target [$concrete] is not instantiable while building [$previous].";
} else {
$message = "Target [$concrete] is not instantiable.";
}
throw new BindingResolutionException($message);
}
$this->buildStack[] = $concrete;
$args = $this->isRunThroughCommandLineInterface() && isset($_SERVER['argv']) ? $_SERVER['argv'] : null;
$detector = new EnvironmentDetector();
return $this->environment = $detector->detect($environments, $args);
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*
* @return mixed
*/
public function build($concrete, array $parameters = [])
{
$object = parent::build($concrete, $parameters);
if (is_object($object)) {
if ($object instanceof ApplicationAwareInterface) {
$object->setApplication($this);
}
if ($object instanceof LoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger($object->getLoggerChannel());
$object->setLogger($logger);
} elseif ($object instanceof PsrLoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger(Channels::CHANNEL_APPLICATION);
$object->setLogger($logger);
}
}
return $object;
}
/**
* @return RuntimeInterface
*/
* @return mixed
*/
public function make($abstract, array $parameters = [])
{
$abstract = $this->getAlias($this->normalize($abstract));
// If an instance of the type is currently being managed as a singleton we'll
// just return an existing instance instead of instantiating new instances
// so the developer can keep using the same objects instance every time.
if (isset($this->instances[$abstract])) {
return $this->instances[$abstract];
}
$concrete = $this->getConcrete($abstract);
// We're ready to instantiate an instance of the concrete type registered for
// the binding. This will instantiate the types, as well as resolve any of
// its "nested" dependencies recursively until all have gotten resolved.
if ($this->isBuildable($concrete, $abstract)) {
$object = $this->build($concrete, $parameters);
} else {
$object = $this->make($concrete, $parameters);
}
// If we defined any extenders for this type, we'll need to spin through them
// and apply them to the object being built. This allows for the extension
// of services, such as changing configuration or decorating the object.
foreach ($this->getExtenders($abstract) as $extender) {
$object = $extender($object, $this);
}
// If the requested type is registered as a singleton we'll want to cache off
// the instances in "memory" so we can return it later without creating an
// entirely new instance of an object on each subsequent request for it.
if ($this->isShared($abstract)) {
$this->instances[$abstract] = $object;
}
$this->fireResolvingCallbacks($abstract, $object);
return $parameter->getDefaultValue();
}
$message = "Unresolvable dependency resolving [$parameter] in class {$parameter->getDeclaringClass()->getName()}";
throw new BindingResolutionException($message);
}
/**
* Resolve a class based dependency from the container.
*
* @param \ReflectionParameter $parameter
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
protected function resolveClass(ReflectionParameter $parameter)
{
try {
return $this->make($parameter->getClass()->name);
}
// If we can not resolve the class instance, we will check to see if the value
// is optional, and if it is we will return the optional parameter value as
// the value of the dependency, similarly to how we do this with scalars.
catch (BindingResolutionException $e) {
if ($parameter->isOptional()) {
return $parameter->getDefaultValue();
}
throw $e;
}
}
/**
* If extra parameters are passed by numeric ID, rekey them by argument name.
*
* @param array $dependencies
* @param array $parameters
* @return array
* @param array $parameters
* @param array $primitives
* @return array
*/
protected function getDependencies(array $parameters, array $primitives = [])
{
$dependencies = [];
foreach ($parameters as $parameter) {
$dependency = $parameter->getClass();
// If the class is null, it means the dependency is a string or some other
// primitive type which we can not resolve since it is not a class and
// we will just bomb out with an error since we have no-where to go.
if (array_key_exists($parameter->name, $primitives)) {
$dependencies[] = $primitives[$parameter->name];
} elseif (is_null($dependency)) {
$dependencies[] = $this->resolveNonClass($parameter);
} else {
$dependencies[] = $this->resolveClass($parameter);
}
}
return $dependencies;
}
/**
* Resolve a non-class hinted dependency.
*
* @param \ReflectionParameter $parameter
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
protected function resolveNonClass(ReflectionParameter $parameter)
{
if (! is_null($concrete = $this->getContextualConcrete('$'.$parameter->name))) {
if ($concrete instanceof Closure) {
return call_user_func($concrete, $this);
} else {
// If there are no constructors, that means there are no dependencies then
// we can just resolve the instances of the objects right away, without
// resolving any other types or dependencies out of these containers.
if (is_null($constructor)) {
array_pop($this->buildStack);
return new $concrete;
}
$dependencies = $constructor->getParameters();
// Once we have all the constructor's parameters we can create each of the
// dependency instances and then use the reflection instances to make a
// new instance of this class, injecting the created dependencies in.
$parameters = $this->keyParametersByArgument(
$dependencies, $parameters
);
$instances = $this->getDependencies(
$dependencies, $parameters
);
array_pop($this->buildStack);
return $reflector->newInstanceArgs($instances);
}
/**
* Resolve all of the dependencies from the ReflectionParameters.
*
* @param array $parameters
* @param array $primitives
* @return array
*/
protected function getDependencies(array $parameters, array $primitives = [])
{
$dependencies = [];
foreach ($parameters as $parameter) {
$args = $this->isRunThroughCommandLineInterface() && isset($_SERVER['argv']) ? $_SERVER['argv'] : null;
$detector = new EnvironmentDetector();
return $this->environment = $detector->detect($environments, $args);
}
/**
* Instantiate a concrete instance of the given type.
*
* @param string $concrete
* @param array $parameters
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*
* @return mixed
*/
public function build($concrete, array $parameters = [])
{
$object = parent::build($concrete, $parameters);
if (is_object($object)) {
if ($object instanceof ApplicationAwareInterface) {
$object->setApplication($this);
}
if ($object instanceof LoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger($object->getLoggerChannel());
$object->setLogger($logger);
} elseif ($object instanceof PsrLoggerAwareInterface) {
$logger = $this->make('log/factory')->createLogger(Channels::CHANNEL_APPLICATION);
$object->setLogger($logger);
}
}
return $object;
}
/**
* @return RuntimeInterface
*/
* @return mixed
*/
public function make($abstract, array $parameters = [])
{
$abstract = $this->getAlias($this->normalize($abstract));
// If an instance of the type is currently being managed as a singleton we'll
// just return an existing instance instead of instantiating new instances
// so the developer can keep using the same objects instance every time.
if (isset($this->instances[$abstract])) {
return $this->instances[$abstract];
}
$concrete = $this->getConcrete($abstract);
// We're ready to instantiate an instance of the concrete type registered for
// the binding. This will instantiate the types, as well as resolve any of
// its "nested" dependencies recursively until all have gotten resolved.
if ($this->isBuildable($concrete, $abstract)) {
$object = $this->build($concrete, $parameters);
} else {
$object = $this->make($concrete, $parameters);
}
// If we defined any extenders for this type, we'll need to spin through them
// and apply them to the object being built. This allows for the extension
// of services, such as changing configuration or decorating the object.
foreach ($this->getExtenders($abstract) as $extender) {
$object = $extender($object, $this);
}
// If the requested type is registered as a singleton we'll want to cache off
// the instances in "memory" so we can return it later without creating an
// entirely new instance of an object on each subsequent request for it.
if ($this->isShared($abstract)) {
$this->instances[$abstract] = $object;
}
$this->fireResolvingCallbacks($abstract, $object);
* Get the ID of the home page.
*
* @param Page|int $page the page (or its ID) for which you want the home (if not specified, we'll use the default locale site tree)
*
* @return int|null returns NULL if $page is null (or it doesn't have a SiteTree associated) and if there's no default locale
*/
public static function getHomePageID($page = null)
{
if ($page) {
if (!$page instanceof self) {
$page = self::getByID($page);
}
if ($page instanceof self) {
$siteTree = $page->getSiteTreeObject();
if ($siteTree !== null) {
return $siteTree->getSiteHomePageID();
}
}
}
$locale = Application::getFacadeApplication()->make(LocaleService::class)->getDefaultLocale();
if ($locale !== null) {
$siteTree = $locale->getSiteTreeObject();
if ($siteTree != null) {
return $siteTree->getSiteHomePageID();
}
}
$entityManager = Application::getFacadeApplication()->make(EntityManagerInterface::class);
try {
$site = $entityManager->getRepository('Concrete\Core\Entity\Site\Site')
->findOneBy(['siteIsDefault' => true]);
if ($site !== null) {
return $site->getSiteHomePageID();
}
} catch (\Exception $e) {
return null;
}
$collectionPath .= '/' . implode('/', $extra);
}
}
$collectionPath = trim($collectionPath, '/');
if ($collectionPath !== '') {
return urlencode($host . '/' . $collectionPath);
}
$cID = $mixed->getCollectionID();
if ($cID && $cID == ConcretePage::getHomePageID()) {
return urlencode($host) . '!' . $cID;
}
} elseif ($mixed instanceof Request) {
$host = $this->getCacheHost($mixed);
$path = trim((string) $mixed->getPath(), '/');
if ($path !== '') {
return urlencode($host . '/' . $path);
}
return urlencode($host) . '!' . ConcretePage::getHomePageID();
} elseif ($mixed instanceof PageCacheRecord) {
return $mixed->getCacheRecordKey();
}
}
/**
* Get the host name under which the page or request belongs to.
*
* @param \Concrete\Core\Page\Page|\Concrete\Core\Http\Request|mixed $mixed
*
* @return string|null Returns NULL if $mixed is not a recognized type, a string otherwise
*/
public function getCacheHost($mixed)
{
if ($mixed instanceof ConcretePage) {
$site = $mixed->getSite();
if (is_object($site)) {
$host = $site->getSiteCanonicalURL();
if (!empty($host)) {
$host = preg_replace('#^https?://#', '', $host);
use Concrete\Core\Page\Page as ConcretePage;
use Loader;
class FilePageCache extends PageCache
{
public function getRecord($mixed)
{
$file = $this->getCacheFile($mixed);
if (file_exists($file)) {
$contents = file_get_contents($file);
$record = @unserialize($contents);
if ($record instanceof PageCacheRecord) {
return $record;
}
}
}
protected function getCacheFile($mixed)
{
$key = $this->getCacheKey($mixed);
if ($key) {
$key = hash('sha256', $key);
$filename = $key . '.cache';
$dir = Config::get('concrete.cache.page.directory') . '/' . $key[0] . '/' . $key[1] . '/' . $key[2];
if ($dir && (!is_dir($dir))) {
@mkdir($dir, Config::get('concrete.filesystem.permissions.directory'), true);
}
$path = $dir . '/' . $filename;
return $path;
}
}
public function purgeByRecord(\Concrete\Core\Cache\Page\PageCacheRecord $rec)
{
$file = $this->getCacheFile($rec);
if ($file && file_exists($file)) {
@unlink($file);
}
}
<?php
namespace Concrete\Core\Cache\Page;
use Config;
use Concrete\Core\Page\Page as ConcretePage;
use Loader;
class FilePageCache extends PageCache
{
public function getRecord($mixed)
{
$file = $this->getCacheFile($mixed);
if (file_exists($file)) {
$contents = file_get_contents($file);
$record = @unserialize($contents);
if ($record instanceof PageCacheRecord) {
return $record;
}
}
}
protected function getCacheFile($mixed)
{
$key = $this->getCacheKey($mixed);
if ($key) {
$key = hash('sha256', $key);
$filename = $key . '.cache';
$dir = Config::get('concrete.cache.page.directory') . '/' . $key[0] . '/' . $key[1] . '/' . $key[2];
if ($dir && (!is_dir($dir))) {
@mkdir($dir, Config::get('concrete.filesystem.permissions.directory'), true);
}
$path = $dir . '/' . $filename;
return $path;
}
}
public function purgeByRecord(\Concrete\Core\Cache\Page\PageCacheRecord $rec)
{
$file = $this->getCacheFile($rec);
if (!$this->isShared('config')) {
throw new Exception('Attempting to check install status before application initialization.');
}
$this->installed = $this->make('config')->get('concrete.installed');
}
return $this->installed;
}
/**
* Checks to see whether we should deliver a concrete5 response from the page cache.
*
* @param \Concrete\Core\Http\Request $request
*/
public function checkPageCache(\Concrete\Core\Http\Request $request)
{
$library = PageCache::getLibrary();
if ($library->shouldCheckCache($request)) {
$record = $library->getRecord($request);
if ($record instanceof PageCacheRecord) {
if ($record->validate($request)) {
return $library->deliver($record);
}
}
}
return false;
}
/**
* Check if the core needs to be updated, and if so, updates it.
*
* @throws \Concrete\Core\System\Mutex\MutexBusyException throws a MutexBusyException exception if there upgrade process is already running
* @throws \Concrete\Core\Updater\Migrations\MigrationIncompleteException throws a MigrationIncompleteException exception if there's still some migration pending
*/
public function handleAutomaticUpdates()
{
$update = false;
$config = $this['config'];
&& $request->getPath() != '/install'
&& !$request->matches('/ccm/assets/localization/*')
) {
$manager = $app->make('Concrete\Core\Url\Resolver\Manager\ResolverManager');
$response = new RedirectResponse($manager->resolve(['install']));
return $response;
}
}
}
/**
* @param \Concrete\Core\Application\Application $app
* @param \Concrete\Core\Http\Request $request
*
* @return null|Response
*/
private function checkCache(Application $app, Request $request)
{
$response = $app->checkPageCache($request);
if ($response) {
return $response;
}
}
/**
* @param \Concrete\Core\Application\Application $app
*/
private function initializePackages(Application $app)
{
$app->setupPackageAutoloaders();
}
}
$request = $this->initializeRequest($config);
/*
* ----------------------------------------------------------------------------
* If we haven't installed, then we need to reroute. If we have, and we're
* on the install page, and we haven't installed, then we need to dispatch
* early and exit.
* ----------------------------------------------------------------------------
*/
if ($response = $this->checkInstall($app, $request)) {
return $response;
}
if ($this->app->isInstalled()) {
/*
* ----------------------------------------------------------------------------
* Check the page cache in case we need to return a result early.
* ----------------------------------------------------------------------------
*/
if ($response = $this->checkCache($app, $request)) {
return $response;
}
/*
* ----------------------------------------------------------------------------
* Now we load all installed packages, and register their package autoloaders.
* ----------------------------------------------------------------------------
*/
$this->initializePackages($app);
}
}
/**
* Enable configuration.
*
* @param Application $app
*
* @return Repository
*/
private function initializeConfig(Application $app)
/*
* ----------------------------------------------------------------------------
* Setup file cache directories. Has to come after we define services
* because we use the file service.
* ----------------------------------------------------------------------------
*/
$app->setupFilesystem();
/*
* ----------------------------------------------------------------------------
* Registries for theme paths, assets, routes and file types.
* ----------------------------------------------------------------------------
*/
$this->initializeAssets($config);
$this->initializeRoutes($config);
$this->initializeFileTypes($config);
// If we're not in the CLI SAPI, lets do additional booting for HTTP
if (!$this->app->isRunThroughCommandLineInterface()) {
return $this->bootHttpSapi($config, $app);
}
}
/**
* @param $config
* @param $app
*
* @return null|Response
*/
private function bootHttpSapi($config, $app)
{
/*
* ----------------------------------------------------------------------------
* Initialize the request
* ----------------------------------------------------------------------------
*/
$request = $this->initializeRequest($config);
/*
* ----------------------------------------------------------------------------
{
$this->run_class = $run_class;
}
/**
* @param string $boot_class
*/
public function setBootClass($boot_class)
{
$this->boot_class = $boot_class;
}
/**
* Initialize the environment and prepare for running.
*/
public function boot()
{
$booter = $this->getBooter();
if ($response = $booter->boot()) {
$this->sendResponse($response);
} else {
$this->status = self::STATUS_ACTIVE;
}
}
/**
* Begin the runtime.
*/
public function run()
{
switch ($this->status) {
case self::STATUS_ENDED:
// We've already ended, lets just return
return;
case self::STATUS_INACTIVE:
throw new \RuntimeException('Runtime has not yet booted.');
}
* Handle text encoding.
* ----------------------------------------------------------------------------
*/
\Patchwork\Utf8\Bootup::initAll();
/*
* ----------------------------------------------------------------------------
* Instantiate concrete5.
* ----------------------------------------------------------------------------
*/
/** @var \Concrete\Core\Application\Application $app */
$app = require DIR_APPLICATION . '/bootstrap/start.php';
$app->instance('app', $app);
// Bind fully application qualified class names
$app->instance('Concrete\Core\Application\Application', $app);
$app->instance('Illuminate\Container\Container', $app);
// Boot the runtime
$app->getRuntime()->boot();
return $app;
* Make sure you cannot call dispatcher.php directly.
* ----------------------------------------------------------------------------
*/
if (basename($_SERVER['PHP_SELF']) === DISPATCHER_FILENAME_CORE) {
die('Access Denied.');
}
/*
* ----------------------------------------------------------------------------
* Include all autoloaders.
* ----------------------------------------------------------------------------
*/
require __DIR__ . '/bootstrap/autoload.php';
/*
* ----------------------------------------------------------------------------
* Begin concrete5 startup.
* ----------------------------------------------------------------------------
*/
$app = require __DIR__ . '/bootstrap/start.php';
/** @var \Concrete\Core\Application\Application $app */
/*
* ----------------------------------------------------------------------------
* Run the runtime.
* ----------------------------------------------------------------------------
*/
$runtime = $app->getRuntime();
if ($response = $runtime->run()) {
/*
* ------------------------------------------------------------------------
* Shut it down.
* ------------------------------------------------------------------------
*/
$app->shutdown();
} else {
return $app;
}
<?php
require 'concrete/dispatcher.php';
Key | Value |
Version | 8.5.12 |
Installed Version | 8.5.12 |
Database Version | 20220319043123 |
Key | Value |
concrete.version | 8.5.12 |
concrete.version_installed | 8.5.12 |
concrete.version_db | 20220319043123 |
concrete.installed | true |
concrete.locale | en_US |
concrete.charset | UTF-8 |
concrete.charset_bom | |
concrete.maintenance_mode | false |
concrete.debug.display_errors | true |
concrete.debug.detail | debug |
concrete.debug.error_reporting | null |
concrete.debug.hide_keys.config.0 | *********************** |
concrete.debug.hide_keys.config.1 | *********************************** |
concrete.debug.hide_keys.config.2 | ****************************** |
concrete.debug.hide_keys.config.3 | ********************************* |
concrete.debug.hide_keys.config.4 | ************************************** |
concrete.debug.hide_keys.config.5 | ******************************************** |
concrete.debug.hide_keys.config.6 | ******************************************** |
concrete.debug.hide_keys.config.7 | ************************ |
concrete.debug.hide_keys.config.8 | ************ |
concrete.proxy.host | null |
concrete.proxy.port | null |
concrete.proxy.user | null |
concrete.proxy.password | *** |
concrete.upload.extensions | *.flv;*.jpg;*.gif;*.jpeg;*.ico;*.docx;*.xla;*.png;*.psd;*.swf;*.doc;*.txt;*.xls;*.xlsx;*.csv;*.pdf;*.tiff;*.rtf;*.m4a;*.mov;*.wmv;*.mpeg;*.mpg;*.wav;*.3gp;*.avi;*.m4v;*.mp4;*.mp3;*.qt;*.ppt;*.pptx;*.kml;*.xml;*.svg;*.webm;*.ogg;*.ogv;*.webp |
concrete.upload.extensions_blacklist | *.php;*.php2;*.php3;*.php4;*.php5;*.php7;*.php8;*.phtml;*.phar;*.htaccess;*.pl;*.phpsh;*.pht;*.shtml;*.cgi |
concrete.upload.chunking.enabled | true |
concrete.upload.chunking.chunkSize | null |
concrete.export.csv.include_bom | false |
concrete.export.csv.datetime_format | Y-m-d\TH:i:sP |
concrete.interface.panel.page_relations | false |
concrete.mail.method | PHP_MAIL |
concrete.mail.methods.smtp.server | |
concrete.mail.methods.smtp.port | |
concrete.mail.methods.smtp.username | |
concrete.mail.methods.smtp.password | |
concrete.mail.methods.smtp.encryption | |
concrete.mail.methods.smtp.messages_per_connection | null |
concrete.mail.methods.smtp.helo_domain | localhost |
concrete.cache.enabled | true |
concrete.cache.lifetime | 21600 |
concrete.cache.overrides | true |
concrete.cache.blocks | true |
concrete.cache.assets | true |
concrete.cache.theme_css | true |
concrete.cache.pages | all |
concrete.cache.doctrine_dev_mode | false |
concrete.cache.full_page_lifetime | forever |
concrete.cache.full_page_lifetime_value | null |
concrete.cache.full_contents_assets_hash | false |
concrete.cache.directory | /home/clients/43d5e6b094c837ecc0d88637dea4baba/var/www/aesthetic-clinic/public/application/files/cache |
concrete.cache.directory_relative | null |
concrete.cache.page.directory | /home/clients/43d5e6b094c837ecc0d88637dea4baba/var/www/aesthetic-clinic/public/application/files/cache/pages |
concrete.cache.page.adapter | file |
concrete.cache.levels.overrides.drivers.core_ephemeral.class | \Stash\Driver\Ephemeral |
concrete.cache.levels.overrides.drivers.core_filesystem.class | Concrete\Core\Cache\Driver\FileSystemStashDriver |
concrete.cache.levels.overrides.drivers.core_filesystem.options.path | /home/clients/43d5e6b094c837ecc0d88637dea4baba/var/www/aesthetic-clinic/public/application/files/cache/overrides |
concrete.cache.levels.overrides.drivers.core_filesystem.options.dirPermissions | 511 |
concrete.cache.levels.overrides.drivers.core_filesystem.options.filePermissions | 438 |
concrete.cache.levels.overrides.drivers.redis.class | Concrete\Core\Cache\Driver\RedisStashDriver |
concrete.cache.levels.overrides.drivers.redis.options.prefix | c5_overrides |
concrete.cache.levels.overrides.drivers.redis.options.database | 0 |
concrete.cache.levels.overrides.preferred_driver | core_filesystem |
concrete.cache.levels.expensive.drivers.core_ephemeral.class | \Stash\Driver\Ephemeral |
concrete.cache.levels.expensive.drivers.core_filesystem.class | Concrete\Core\Cache\Driver\FileSystemStashDriver |
concrete.cache.levels.expensive.drivers.core_filesystem.options.path | /home/clients/43d5e6b094c837ecc0d88637dea4baba/var/www/aesthetic-clinic/public/application/files/cache/expensive |
concrete.cache.levels.expensive.drivers.core_filesystem.options.dirPermissions | 511 |
concrete.cache.levels.expensive.drivers.core_filesystem.options.filePermissions | 438 |
concrete.cache.levels.expensive.drivers.redis.class | Concrete\Core\Cache\Driver\RedisStashDriver |
concrete.cache.levels.expensive.drivers.redis.options.prefix | c5_expensive |
concrete.cache.levels.expensive.drivers.redis.options.database | 0 |
concrete.cache.levels.expensive.preferred_driver | core_filesystem |
concrete.cache.levels.object.drivers.core_ephemeral.class | \Stash\Driver\Ephemeral |
concrete.cache.levels.object.drivers.redis.class | Concrete\Core\Cache\Driver\RedisStashDriver |
concrete.cache.levels.object.drivers.redis.options.prefix | c5_object |
concrete.cache.levels.object.drivers.redis.options.database | 0 |
concrete.cache.levels.object.preferred_driver | core_ephemeral |
concrete.cache.clear.thumbnails | true |
concrete.cache.clear.last_cleared | 1648642409 |
concrete.cache.last_cleared | 1705674320 |
concrete.design.enable_custom | true |
concrete.design.enable_layouts | true |
concrete.log.emails | true |
concrete.log.errors | true |
concrete.log.spam | false |
concrete.log.api | false |
concrete.log.enable_dashboard_report | true |
concrete.log.configuration.mode | simple |
concrete.log.configuration.simple.core_logging_level | NOTICE |
concrete.log.configuration.simple.handler | database |
concrete.log.configuration.simple.file.file | |
concrete.jobs.enable_scheduling | true |
concrete.filesystem.temp_directory | null |
concrete.filesystem.permissions.file | 438 |
concrete.filesystem.permissions.directory | 511 |
concrete.email.enabled | true |
concrete.email.default.address | *************************** |
concrete.email.default.name | |
concrete.email.form_block.address | *** |
concrete.email.forgot_password.address | *** |
concrete.email.forgot_password.name | null |
concrete.email.validate_registration.address | *** |
concrete.email.validate_registration.name | null |
concrete.email.workflow_notification.address | *** |
concrete.email.workflow_notification.name | null |
concrete.form.store_form_submissions | auto |
concrete.marketplace.enabled | true |
concrete.marketplace.request_timeout | 30 |
concrete.marketplace.token | null |
concrete.marketplace.site_token | null |
concrete.marketplace.intelligent_search | true |
concrete.marketplace.log_requests | false |
concrete.external.intelligent_search_help | true |
concrete.external.news | true |
concrete.misc.user_timezones | false |
concrete.misc.package_backup_directory | /home/clients/43d5e6b094c837ecc0d88637dea4baba/var/www/aesthetic-clinic/public/application/files/trash |
concrete.misc.enable_progressive_page_reindex | true |
concrete.misc.mobile_theme_id | 0 |
concrete.misc.sitemap_approve_immediately | true |
concrete.misc.enable_translate_locale_en_us | false |
concrete.misc.page_search_index_lifetime | 259200 |
concrete.misc.enable_trash_can | true |
concrete.misc.default_jpeg_image_compression | 60 |
concrete.misc.default_png_image_compression | 9 |
concrete.misc.default_thumbnail_format | auto |
concrete.misc.inplace_image_operations_limit | 4194304 |
concrete.misc.basic_thumbnailer_generation_strategy | now |
concrete.misc.help_overlay | true |
concrete.misc.require_version_comments | false |
concrete.misc.enable_move_blocktypes_across_sets | false |
concrete.misc.image_editor_cors_policy.enable_cross_origin | false |
concrete.misc.image_editor_cors_policy.anonymous_request | true |
concrete.misc.generator_tag_display_in_header | true |
concrete.misc.do_page_reindex_check | false |
concrete.misc.latest_version | 8.5.12 |
concrete.misc.search_index_area_list | a:0:{} |
concrete.misc.search_index_area_method | whitelist |
concrete.theme.compress_preprocessor_output | true |
concrete.theme.generate_less_sourcemap | false |
concrete.updates.enable_auto_update_packages | false |
concrete.updates.enable_permissions_protection | true |
concrete.updates.check_threshold | 172800 |
concrete.updates.services.get_available_updates | https://marketplace.concretecms.com/tools/update_core |
concrete.updates.services.inspect_update | https://marketplace.concretecms.com/tools/inspect_update |
concrete.updates.skip_core | true |
concrete.paths.trash | /!trash |
concrete.paths.drafts | /!drafts |
concrete.icons.page_template.width | 120 |
concrete.icons.page_template.height | 90 |
concrete.icons.theme_thumbnail.width | 120 |
concrete.icons.theme_thumbnail.height | 90 |
concrete.icons.file_manager_listing.handle | file_manager_listing |
concrete.icons.file_manager_listing.width | 60 |
concrete.icons.file_manager_listing.height | 60 |
concrete.icons.file_manager_detail.handle | file_manager_detail |
concrete.icons.file_manager_detail.width | 400 |
concrete.icons.file_manager_detail.height | 400 |
concrete.icons.user_avatar.width | 80 |
concrete.icons.user_avatar.height | 80 |
concrete.icons.user_avatar.default | /concrete/images/avatar_none.png |
concrete.file_manager.images.use_exif_data_to_rotate_images | false |
concrete.file_manager.images.manipulation_library | gd |
concrete.file_manager.images.create_high_dpi_thumbnails | true |
concrete.file_manager.images.preview_image_size | small |
concrete.file_manager.images.preview_image_popover | true |
concrete.file_manager.images.svg_sanitization.action | sanitize |
concrete.file_manager.images.svg_sanitization.allowed_tags | |
concrete.file_manager.images.svg_sanitization.allowed_attributes | |
concrete.file_manager.images.image_editor_save_area_background_color | |
concrete.file_manager.items_per_page_options.0 | 10 |
concrete.file_manager.items_per_page_options.1 | 25 |
concrete.file_manager.items_per_page_options.2 | 50 |
concrete.file_manager.items_per_page_options.3 | 100 |
concrete.file_manager.items_per_page_options.4 | 250 |
concrete.file_manager.results | 10 |
concrete.file_manager.restrict_max_width | null |
concrete.file_manager.restrict_max_height | null |
concrete.search_users.results | 10 |
concrete.sitemap_xml.file | sitemap.xml |
concrete.sitemap_xml.frequency | weekly |
concrete.sitemap_xml.priority | 0.5 |
concrete.accessibility.toolbar_titles | false |
concrete.accessibility.toolbar_large_font | false |
concrete.accessibility.display_help_system | true |
concrete.accessibility.toolbar_tooltips | true |
concrete.i18n.choose_language_login | false |
concrete.i18n.auto_install_package_languages | true |
concrete.i18n.community_translation.entry_point | https://translate.concretecms.org/api |
concrete.i18n.community_translation.api_token | |
concrete.i18n.community_translation.progress_limit | 60 |
concrete.i18n.community_translation.cache_lifetime | 3600 |
concrete.i18n.community_translation.package_url | https://translate.concretecms.org/translate/package |
concrete.urls.concrete5 | http://marketplace.concretecms.com |
concrete.urls.concrete5_secure | https://marketplace.concretecms.com |
concrete.urls.newsflow | http://newsflow.concrete5.org |
concrete.urls.background_feed | //backgroundimages.concrete5.org/wallpaper |
concrete.urls.privacy_policy | //www.concretecms.com/about/legal/privacy-policy |
concrete.urls.background_feed_secure | https://backgroundimages.concrete5.org/wallpaper |
concrete.urls.background_info | http://backgroundimages.concrete5.org/get_image_data.php |
concrete.urls.videos | https://www.youtube.com/user/concrete5cms/videos |
concrete.urls.help.developer | http://documentation.concrete5.org/developers |
concrete.urls.help.user | http://documentation.concrete5.org/editors |
concrete.urls.help.forum | http://www.concrete5.org/community/forums |
concrete.urls.help.slack | https://www.concrete5.org/slack |
concrete.urls.paths.menu_help_service | /tools/get_remote_help_list/ |
concrete.urls.paths.site_page | /private/sites |
concrete.urls.paths.newsflow_slot_content | /tools/slot_content/ |
concrete.urls.paths.marketplace.projects | /profile/projects/ |
concrete.urls.paths.marketplace.connect | /marketplace/connect |
concrete.urls.paths.marketplace.connect_success | /marketplace/connect/-/connected |
concrete.urls.paths.marketplace.connect_validate | /marketplace/connect/-/validate |
concrete.urls.paths.marketplace.connect_new_token | /marketplace/connect/-/generate_token |
concrete.urls.paths.marketplace.checkout | /cart/-/add |
concrete.urls.paths.marketplace.purchases | /marketplace/connect/-/get_available_licenses |
concrete.urls.paths.marketplace.item_information | /marketplace/connect/-/get_item_information |
concrete.urls.paths.marketplace.item_free_license | /marketplace/connect/-/enable_free_license |
concrete.urls.paths.marketplace.remote_item_list | /marketplace/ |
concrete.white_label.logo | false |
concrete.white_label.name | false |
concrete.white_label.background_image | null |
concrete.white_label.background_url | false |
concrete.session.name | CONCRETE5 |
concrete.session.handler | file |
concrete.session.redis.database | 1 |
concrete.session.save_path | null |
concrete.session.max_lifetime | 7200 |
concrete.session.gc_probability | 1 |
concrete.session.gc_divisor | 100 |
concrete.session.cookie.cookie_path | false |
concrete.session.cookie.cookie_lifetime | 0 |
concrete.session.cookie.cookie_domain | false |
concrete.session.cookie.cookie_secure | true |
concrete.session.cookie.cookie_httponly | true |
concrete.session.cookie.cookie_raw | false |
concrete.session.cookie.cookie_samesite | Lax |
concrete.session.remember_me.lifetime | 1209600 |
concrete.user.registration.enabled | false |
concrete.user.registration.type | disabled |
concrete.user.registration.captcha | true |
concrete.user.registration.email_registration | false |
concrete.user.registration.display_username_field | true |
concrete.user.registration.display_confirm_password_field | true |
concrete.user.registration.validate_email | false |
concrete.user.registration.approval | false |
concrete.user.registration.notification | false |
concrete.user.group.badge.default_point_value | 50 |
concrete.user.username.maximum | 64 |
concrete.user.username.minimum | 3 |
concrete.user.username.allowed_characters.boundary | A-Za-z0-9 |
concrete.user.username.allowed_characters.middle | A-Za-z0-9_\. |
concrete.user.username.allowed_characters.requirement_string | A username may only contain letters, numbers, dots (not at the beginning/end), and underscores (not at the beginning/end). |
concrete.user.username.allowed_characters.error_string | A username may only contain letters, numbers, dots (not at the beginning/end), and underscores (not at the beginning/end). |
concrete.user.password.maximum | 128 |
concrete.user.password.minimum | 5 |
concrete.user.password.required_special_characters | 0 |
concrete.user.password.required_lower_case | 0 |
concrete.user.password.required_upper_case | 0 |
concrete.user.password.reuse | 0 |
concrete.user.password.hash_portable | false |
concrete.user.password.hash_cost_log2 | 12 |
concrete.user.password.legacy_salt | |
concrete.user.email.test_mx_record | false |
concrete.user.email.strict | true |
concrete.user.private_messages.throttle_max | 20 |
concrete.user.private_messages.throttle_max_timespan | 15 |
concrete.user.deactivation.enable_login_threshold_deactivation | false |
concrete.user.deactivation.login.threshold | 120 |
concrete.user.deactivation.authentication_failure.enabled | false |
concrete.user.deactivation.authentication_failure.amount | 5 |
concrete.user.deactivation.authentication_failure.duration | 300 |
concrete.user.deactivation.message | This user is inactive. Please contact us regarding this account. |
concrete.spam.whitelist_group | 0 |
concrete.spam.notify_email | |
concrete.calendar.colors.text | #ffffff |
concrete.calendar.colors.background | #3A87AD |
concrete.security.session.invalidate_on_user_agent_mismatch | true |
concrete.security.session.invalidate_on_ip_mismatch | true |
concrete.security.session.invalidate_inactive_users.enabled | false |
concrete.security.session.invalidate_inactive_users.time | 300 |
concrete.security.misc.x_frame_options | SAMEORIGIN |
concrete.permissions.forward_to_login | true |
concrete.permissions.model | advanced |
concrete.seo.exclude_words | a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with |
concrete.seo.url_rewriting | true |
concrete.seo.url_rewriting_all | false |
concrete.seo.redirect_to_canonical_url | 1 |
concrete.seo.canonical_url | null |
concrete.seo.canonical_url_alternative | null |
concrete.seo.trailing_slash | false |
concrete.seo.title_format | %2$s :: %1$s |
concrete.seo.title_segment_separator | :: |
concrete.seo.page_path_separator | - |
concrete.seo.group_name_separator | / |
concrete.seo.segment_max_length | 128 |
concrete.seo.paging_string | ccm_paging_p |
concrete.statistics.track_downloads | true |
concrete.limits.sitemap_pages | 100 |
concrete.limits.delete_pages | 100 |
concrete.limits.copy_pages | 10 |
concrete.limits.page_search_index_batch | 200 |
concrete.limits.job_queue_batch | 10 |
concrete.limits.style_customizer.size_min | -50 |
concrete.limits.style_customizer.size_max | 200 |
concrete.page.search.always_reindex | false |
concrete.composer.idle_timeout | 1 |
concrete.api.enabled | false |
concrete.api.grant_types.client_credentials | true |
concrete.api.grant_types.authorization_code | true |
concrete.api.grant_types.password_credentials | false |
concrete.api.grant_types.refresh_token | true |
concrete.mutex.semaphore.priority | 100 |
concrete.mutex.semaphore.class | Concrete\Core\System\Mutex\SemaphoreMutex |
concrete.mutex.file_lock.priority | 50 |
concrete.mutex.file_lock.class | Concrete\Core\System\Mutex\FileLockMutex |
concrete.style_customizer.updater.ignored_values.preset-fonts-file | Concrete\Core\StyleCustomizer\Style\Value\BasicValue |
concrete.version_db_installed | 20220319043123 |
Key | Value |
TEMP | ************************************************** |
TMPDIR | ************************************************** |
TMP | ************************************************** |
ORIG_SCRIPT_NAME | ******************* |
ORIG_PATH_TRANSLATED | **************************************************************************************** |
ORIG_PATH_INFO | ********** |
ORIG_SCRIPT_FILENAME | ***************************************************************************************************** |
SCRIPT_NAME | ********** |
REQUEST_URI | * |
QUERY_STRING | |
REQUEST_METHOD | *** |
SERVER_PROTOCOL | ******** |
GATEWAY_INTERFACE | ******* |
HTTPS | ** |
REDIRECT_URL | ********** |
REMOTE_PORT | ***** |
SCRIPT_FILENAME | **************************************************************************************** |
SERVER_ADMIN | ************************** |
DOCUMENT_ROOT | ****************************************************************************** |
REMOTE_ADDR | ************** |
SERVER_PORT | ** |
SERVER_ADDR | ************ |
SERVER_NAME | ******************** |
SERVER_SOFTWARE | ****** |
SERVER_SIGNATURE | |
PATH | ***************************** |
HTTP_X_FORWARDED_FOR | ************** |
HTTP_X_FORWARDED_PROTO | ***** |
HTTP_HOST | ******************** |
HTTP_REFERER | ************************ |
HTTP_USER_AGENT | ********* |
HTTP_ACCEPT | *** |
PHP_VERSION | *** |
SCRIPT_URI | **************************** |
SCRIPT_URL | * |
MEF_PROXY_ADDR | ************ |
UNIQUE_ID | ************************ |
REDIRECT_STATUS | *** |
REDIRECT_HANDLER | ********* |
REDIRECT_PHP_VERSION | *** |
REDIRECT_SCRIPT_URI | **************************** |
REDIRECT_SCRIPT_URL | * |
REDIRECT_MEF_PROXY_ADDR | ************ |
REDIRECT_UNIQUE_ID | ************************ |
FCGI_ROLE | ********* |
PHP_SELF | ********** |
REQUEST_TIME_FLOAT | *** |
REQUEST_TIME | *** |
DB_USERNAME | |
DB_PASSWORD | |
DB_DATABASE | |
DB_HOSTNAME | ********* |
DB_CHARSET | ******* |
USE_WEBPACK_DEV_SERVER | ***** |
EXTRACT_CSS | ***** |
GOOGLE_CAPTCHA_KEY | **************************************** |
GOOGLE_CAPTCHA_SECRET | **************************************** |
Key | Value |
TEMP | ************************************************** |
TMPDIR | ************************************************** |
TMP | ************************************************** |
ORIG_SCRIPT_NAME | ******************* |
ORIG_PATH_TRANSLATED | **************************************************************************************** |
ORIG_PATH_INFO | ********** |
ORIG_SCRIPT_FILENAME | ***************************************************************************************************** |
SCRIPT_NAME | ********** |
REQUEST_URI | * |
QUERY_STRING | |
REQUEST_METHOD | *** |
SERVER_PROTOCOL | ******** |
GATEWAY_INTERFACE | ******* |
HTTPS | ** |
REDIRECT_URL | ********** |
REMOTE_PORT | ***** |
SCRIPT_FILENAME | **************************************************************************************** |
SERVER_ADMIN | ************************** |
DOCUMENT_ROOT | ****************************************************************************** |
REMOTE_ADDR | ************** |
SERVER_PORT | ** |
SERVER_ADDR | ************ |
SERVER_NAME | ******************** |
SERVER_SOFTWARE | ****** |
SERVER_SIGNATURE | |
PATH | ***************************** |
HTTP_X_FORWARDED_FOR | ************** |
HTTP_X_FORWARDED_PROTO | ***** |
HTTP_HOST | ******************** |
HTTP_REFERER | ************************ |
HTTP_USER_AGENT | ********* |
HTTP_ACCEPT | *** |
PHP_VERSION | *** |
SCRIPT_URI | **************************** |
SCRIPT_URL | * |
MEF_PROXY_ADDR | ************ |
UNIQUE_ID | ************************ |
REDIRECT_STATUS | *** |
REDIRECT_HANDLER | ********* |
REDIRECT_PHP_VERSION | *** |
REDIRECT_SCRIPT_URI | **************************** |
REDIRECT_SCRIPT_URL | * |
REDIRECT_MEF_PROXY_ADDR | ************ |
REDIRECT_UNIQUE_ID | ************************ |
FCGI_ROLE | ********* |
PHP_SELF | ********** |
REQUEST_TIME_FLOAT | *** |
REQUEST_TIME | *** |
DB_USERNAME | |
DB_PASSWORD | |
DB_DATABASE | |
DB_HOSTNAME | ********* |
DB_CHARSET | ******* |
USE_WEBPACK_DEV_SERVER | ***** |
EXTRACT_CSS | ***** |
GOOGLE_CAPTCHA_KEY | **************************************** |
GOOGLE_CAPTCHA_SECRET | **************************************** |