} /** * Checks to see whether the requisite permissions are available on the specified path. * * @throws Exception\RuntimeException * @throws Exception\InvalidArgumentException */ public static function checkFileSystemPermissions($path = null, $permissions) { if (!isset($path)) { throw new RuntimeException('Cache path was not set correctly.'); } if (file_exists($path) && !is_dir($path)) { throw new InvalidArgumentException('Cache path is not a directory.'); } if (!is_dir($path) && !@mkdir($path, $permissions, true)) { throw new InvalidArgumentException('Failed to create cache path.'); } if (!is_writable($path)) { throw new InvalidArgumentException('Cache path is not writable.'); } } /** * Checks to see if a directory is empty. * * @param string $path * @return bool */ public static function checkForEmptyDirectory($path) { $empty = true; $dir = opendir($path); while ($file = readdir($dir)) { if ($file != '.' && $file != '..') { $empty = false;
$encoder = $options['encoder']; if (is_object($encoder)) { if (!($encoder instanceof EncoderInterface)) { throw new RuntimeException('Encoder object must implement EncoderInterface'); } $this->encoder = new $encoder; } else { $encoderInterface = 'Stash\Driver\FileSystem\EncoderInterface'; $encoderClass = 'Stash\Driver\FileSystem\\' . $encoder . 'Encoder'; if (class_exists($encoder) && in_array($encoderInterface, class_implements($encoder))) { $this->encoder = new $encoder(); } elseif (class_exists($encoderClass) && in_array($encoderInterface, class_implements($encoderClass))) { $this->encoder = new $encoderClass(); } else { throw new RuntimeException('Invalid Encoder: ' . $encoder); } } } Utilities::checkFileSystemPermissions($this->cachePath, $this->dirPermissions); } /** * Converts a key array into a key string. * * @param array $key * @return string */ protected function makeKeyString($key) { $keyString = ''; foreach ($key as $group) { $keyString .= $group . '/'; } return $keyString; } /** * This function retrieves the data from the file. If the file does not exist, or is currently being written to, it
* @package Stash * @author Robert Hafner <tedivm@tedivm.com> */ abstract class AbstractDriver implements DriverInterface { /** * Initializes the driver. * * @param array $options * An additional array of options to pass through to setOptions(). * * @throws RuntimeException */ public function __construct(array $options = array()) { if (!static::isAvailable()) { throw new RuntimeException(get_class($this) . ' is not available.'); } $this->setOptions($options); } /** * @return array */ public function getDefaultOptions() { return array(); } /** * {@inheritdoc} */ protected function setOptions(array $options = array()) { // empty } /** * {@inheritdoc}
{ $drivers = array(); $driver_configs = Config::get("concrete.cache.levels.{$level}.drivers", array()); foreach ($driver_configs as $driver_build) { if (!$driver_build) { continue; } $class = array_get($driver_build, 'class', ''); if ($class && class_exists($class)) { $implements = class_implements($class); // Make sure that the provided class implements the DriverInterface if (isset($implements['Stash\Interfaces\DriverInterface'])) { /** @var \Stash\Interfaces\DriverInterface $temp_driver */ if ($options = array_get($driver_build, 'options', null)) { $temp_driver = new $class($options); } else { $temp_driver = new $class; } $drivers[] = $temp_driver; } else { throw new \RuntimeException('Cache driver class must implement \Stash\Interfaces\DriverInterface.'); } } } $count = count($drivers); if ($count > 1) { $driver = new Composite(['drivers' => $drivers]); } elseif ($count === 1) { $driver = $drivers[0]; } else { $driver = new BlackHole(); }
<?php namespace Concrete\Core\Cache\Level; use Concrete\Core\Cache\Cache; use Config; use Stash\Driver\BlackHole; use Stash\Pool; /** * Class ExpensiveCache * This cache stores data that is expensive to build that will see a performance boost if stored on disk. * * \@package Concrete\Core\Cache\Level */ class ExpensiveCache extends Cache { protected function init() { if (Config::get('concrete.cache.enabled') == true) { $driver = $this->loadConfig('expensive'); $this->pool = new Pool($driver); } else { $this->pool = new Pool(new BlackHole()); } $this->enable(); } }
* - ObjectCache * - RequestCache * * Cache storage is performed using the Stash Library, see http://www.stashphp.com/ * * This class imports the various caching settings from Config class, sets * up the Stash pools and provides a basic caching API for all of Concrete5. */ abstract class Cache implements FlushableInterface { /** @var Pool */ public $pool = null; /** @var bool */ protected $enabled = false; /** @var \Stash\Interfaces\DriverInterface */ protected $driver = null; public function __construct() { $this->init(); } /** * Initializes the cache by setting up the cache pool and enabling the cache. */ abstract protected function init(); /** * Loads the composite driver from constants. * * @param $level * * @return \Stash\Interfaces\DriverInterface */ protected function loadConfig($level) { $drivers = array(); $driver_configs = Config::get("concrete.cache.levels.{$level}.drivers", array()); foreach ($driver_configs as $driver_build) {
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) { $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)) {
$args = 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 * * @return mixed * * @throws BindingResolutionException */ public function build($concrete, array $parameters = []) { $object = parent::build($concrete, $parameters); if (is_object($object) && $object instanceof ApplicationAwareInterface) { $object->setApplication($this); } return $object; } /** * @return RuntimeInterface */ public function getRuntime() { // Set the runtime to a singleton $runtime_class = 'Concrete\Core\Foundation\Runtime\DefaultRuntime'; if (!$this->isShared($runtime_class)) { $this->singleton($runtime_class); } /** @var DefaultRuntime $runtime */ $runtime = $this->make($runtime_class);
* @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 = 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 * * @return mixed * * @throws BindingResolutionException */ public function build($concrete, array $parameters = []) { $object = parent::build($concrete, $parameters); if (is_object($object) && $object instanceof ApplicationAwareInterface) { $object->setApplication($this); } return $object; } /** * @return RuntimeInterface */ public function getRuntime() { // Set the runtime to a singleton $runtime_class = 'Concrete\Core\Foundation\Runtime\DefaultRuntime'; if (!$this->isShared($runtime_class)) { $this->singleton($runtime_class); } /** @var DefaultRuntime $runtime */ $runtime = $this->make($runtime_class);
* @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);
* Handle dynamic, static calls to the object. * * @param string $method * @param array $args * * @return mixed */ public static function __callStatic($method, $args) { $instance = static::resolveFacadeInstance(static::getFacadeAccessor()); if (!method_exists($instance, $method)) { throw new \Exception(t('Invalid Method on class %s: %s.', get_class($instance), $method)); } switch (count($args)) { case 0: return $instance->$method(); case 1: return $instance->$method($args[0]); case 2: return $instance->$method($args[0], $args[1]); case 3: return $instance->$method($args[0], $args[1], $args[2]); case 4: return $instance->$method($args[0], $args[1], $args[2], $args[3]); default: return call_user_func_array(array($instance, $method), $args); } } }
/** * @var string Name of the cache being used */ private $cacheName; /** * @param string $cacheName Name of the cache being used. Defaults to cache. */ public function __construct($cacheName = 'cache') { $this->cacheName = $cacheName; } /** * @return Cache */ private function getC5Cache() { if ($this->c5Cache === null) { $this->c5Cache = Core::make($this->cacheName); } return $this->c5Cache; } /** * {@inheritdoc} */ protected function doFetch($id) { if (!$this->getC5Cache()->isEnabled()) { return false; } $item = $this->getC5Cache()->getItem('doctrine/' . $id); return $item->isMiss() ? false : $item->get(); } /** * {@inheritdoc}
/** * @var string Name of the cache being used */ private $cacheName; /** * @param string $cacheName Name of the cache being used. Defaults to cache. */ public function __construct($cacheName = 'cache') { $this->cacheName = $cacheName; } /** * @return Cache */ private function getC5Cache() { if ($this->c5Cache === null) { $this->c5Cache = Core::make($this->cacheName); } return $this->c5Cache; } /** * {@inheritdoc} */ protected function doFetch($id) { if (!$this->getC5Cache()->isEnabled()) { return false; } $item = $this->getC5Cache()->getItem('doctrine/' . $id); return $item->isMiss() ? false : $item->get(); } /** * {@inheritdoc}
} /** * @return Cache */ private function getC5Cache() { if ($this->c5Cache === null) { $this->c5Cache = Core::make($this->cacheName); } return $this->c5Cache; } /** * {@inheritdoc} */ protected function doFetch($id) { if (!$this->getC5Cache()->isEnabled()) { return false; } $item = $this->getC5Cache()->getItem('doctrine/' . $id); return $item->isMiss() ? false : $item->get(); } /** * {@inheritdoc} */ protected function doContains($id) { if (!$this->getC5Cache()->isEnabled()) { return false; } return $this->getC5Cache()->exists('doctrine/' . $id); } /**
* @return string */ private function getNamespaceCacheKey() { return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); } /** * Returns the namespace version. * * @return integer */ private function getNamespaceVersion() { if (null !== $this->namespaceVersion) { return $this->namespaceVersion; } $namespaceCacheKey = $this->getNamespaceCacheKey(); $this->namespaceVersion = $this->doFetch($namespaceCacheKey) ?: 1; return $this->namespaceVersion; } /** * Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it. * * @param array $keys Array of keys to retrieve from cache * @return array Array of values retrieved for the given keys. */ protected function doFetchMultiple(array $keys) { $returnValues = array(); foreach ($keys as $key) { if (false !== ($item = $this->doFetch($key)) || $this->doContains($key)) { $returnValues[$key] = $item; } }
if ($this->doSave($namespaceCacheKey, $namespaceVersion)) { $this->namespaceVersion = $namespaceVersion; return true; } return false; } /** * Prefixes the passed id with the configured namespace value. * * @param string $id The id to namespace. * * @return string The namespaced id. */ private function getNamespacedId($id) { $namespaceVersion = $this->getNamespaceVersion(); return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion); } /** * Returns the namespace cache key. * * @return string */ private function getNamespaceCacheKey() { return sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace); } /** * Returns the namespace version. * * @return integer */ private function getNamespaceVersion()
$this->namespace = (string) $namespace; $this->namespaceVersion = null; } /** * Retrieves the namespace that prefixes all cache ids. * * @return string */ public function getNamespace() { return $this->namespace; } /** * {@inheritdoc} */ public function fetch($id) { return $this->doFetch($this->getNamespacedId($id)); } /** * {@inheritdoc} */ public function fetchMultiple(array $keys) { if (empty($keys)) { return array(); } // note: the array_combine() is in place to keep an association between our $keys and the $namespacedKeys $namespacedKeys = array_combine($keys, array_map(array($this, 'getNamespacedId'), $keys)); $items = $this->doFetchMultiple($namespacedKeys); $foundItems = array(); // no internal array function supports this sort of mapping: needs to be iterative // this filters and combines keys in one pass foreach ($namespacedKeys as $requestedKey => $namespacedKey) { if (isset($items[$namespacedKey]) || array_key_exists($namespacedKey, $items)) {
// Check for namespace alias if (strpos($className, ':') !== false) { list($namespaceAlias, $simpleClassName) = explode(':', $className, 2); $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName); } else { $realClassName = ClassUtils::getRealClass($className); } if (isset($this->loadedMetadata[$realClassName])) { // We do not have the alias name in the map, include it return $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName]; } $loadingException = null; try { if ($this->cacheDriver) { if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) instanceof ClassMetadata) { $this->loadedMetadata[$realClassName] = $cached; $this->wakeupReflection($cached, $this->getReflectionService()); } else { foreach ($this->loadMetadata($realClassName) as $loadedClassName) { $this->cacheDriver->save( $loadedClassName . $this->cacheSalt, $this->loadedMetadata[$loadedClassName], null ); } } } else { $this->loadMetadata($realClassName); } } catch (MappingException $loadingException) { if (! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName)) { throw $loadingException; }
/** * Returns the ORM metadata descriptor for a class. * * The class name must be the fully-qualified class name without a leading backslash * (as it is returned by get_class($obj)) or an aliased class name. * * Examples: * MyProject\Domain\User * sales:PriceRequest * * Internal note: Performance-sensitive method. * * @param string $className * * @return \Doctrine\ORM\Mapping\ClassMetadata */ public function getClassMetadata($className) { return $this->metadataFactory->getMetadataFor($className); } /** * {@inheritDoc} */ public function createQuery($dql = '') { $query = new Query($this); if ( ! empty($dql)) { $query->setDql($dql); } return $query; } /** * {@inheritDoc} */ public function createNamedQuery($name)
* This factory is used to create default repository objects for entities at runtime. * * @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @since 2.4 */ final class DefaultRepositoryFactory implements RepositoryFactory { /** * The list of EntityRepository instances. * * @var \Doctrine\Common\Persistence\ObjectRepository[] */ private $repositoryList = array(); /** * {@inheritdoc} */ public function getRepository(EntityManagerInterface $entityManager, $entityName) { $repositoryHash = $entityManager->getClassMetadata($entityName)->getName() . spl_object_hash($entityManager); if (isset($this->repositoryList[$repositoryHash])) { return $this->repositoryList[$repositoryHash]; } return $this->repositoryList[$repositoryHash] = $this->createRepository($entityManager, $entityName); } /** * Create a new repository instance for an entity class. * * @param \Doctrine\ORM\EntityManagerInterface $entityManager The EntityManager instance. * @param string $entityName The name of the entity. * * @return \Doctrine\Common\Persistence\ObjectRepository */ private function createRepository(EntityManagerInterface $entityManager, $entityName) { /* @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */ $metadata = $entityManager->getClassMetadata($entityName);
} /** * {@inheritDoc} */ public function lock($entity, $lockMode, $lockVersion = null) { $this->unitOfWork->lock($entity, $lockMode, $lockVersion); } /** * Gets the repository for an entity class. * * @param string $entityName The name of the entity. * * @return \Doctrine\ORM\EntityRepository The repository class. */ public function getRepository($entityName) { return $this->repositoryFactory->getRepository($this, $entityName); } /** * Determines whether an entity instance is managed in this EntityManager. * * @param object $entity * * @return boolean TRUE if this EntityManager currently manages the given entity, FALSE otherwise. */ public function contains($entity) { return $this->unitOfWork->isScheduledForInsert($entity) || $this->unitOfWork->isInIdentityMap($entity) && ! $this->unitOfWork->isScheduledForDelete($entity); } /** * {@inheritDoc} */ public function getEventManager()
{ CacheLocal::delete('packageHandleList', false); CacheLocal::delete('pkgList', 1); CacheLocal::delete('pkgList', 0); } /** * @deprecated * @param int $pkgIsInstalled * @return static */ public static function get($pkgIsInstalled = 1) { $pkgList = CacheLocal::getEntry('pkgList', $pkgIsInstalled); if ($pkgList != false) { return $pkgList; } $em = \Database::connection()->getEntityManager(); $r = $em->getRepository('\Concrete\Core\Entity\Package'); $packages = $r->findBy(array('pkgIsInstalled' => true), array('pkgID' => 'asc')); $list = new static(); foreach($packages as $pkg) { $list->add($pkg); } CacheLocal::set('pkgList', $pkgIsInstalled, $list); return $list; } }
return false; } public function handleAutomaticUpdates() { $config = $this['config']; $installed = $config->get('concrete.version_db_installed'); $core = $config->get('concrete.version_db'); if ($installed < $core) { Update::updateToCurrentVersion(); } } /** * Register package autoloaders. Has to come BEFORE session calls. */ public function setupPackageAutoloaders() { $pla = \Concrete\Core\Package\PackageList::get(); $pl = $pla->getPackages(); $cl = ClassLoader::getInstance(); /** @var \Package[] $pl */ foreach ($pl as $p) { \Config::package($p); if ($p->isPackageInstalled()) { $pkg = $this->make('Concrete\Core\Package\PackageService')->getClass($p->getPackageHandle()); if (is_object($pkg) && (!$pkg instanceof \Concrete\Core\Package\BrokenPackage)) { $cl->registerPackage($pkg); $this->packages[] = $pkg; } } } } /** * Run startup and localization events on any installed packages. */ public function setupPackages() {
/** * @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(); } }
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); /** * ---------------------------------------------------------------------------- * Load preprocess items * ----------------------------------------------------------------------------. */ require DIR_BASE_CORE . '/bootstrap/preprocess.php'; } } /** * Enable configuration. * * @param Application $app * * @return Repository */ private function initializeConfig(Application $app) { $config_provider = $app->make('Concrete\Core\Config\ConfigServiceProvider');
/* * ---------------------------------------------------------------------------- * 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 $cms */ $cms = require DIR_APPLICATION . '/bootstrap/start.php'; $cms->instance('app', $cms); // Bind fully application qualified class names $cms->instance('Concrete\Core\Application\Application', $cms); $cms->instance('Illuminate\Container\Container', $cms); // Boot the runtime $cms->getRuntime()->boot(); return $cms;
* Set required constants, including directory names, attempt to include site configuration file with database * information, attempt to determine if we ought to skip to an updated core, etc... * ---------------------------------------------------------------------------- */ require $__DIR__ . '/bootstrap/configure.php'; /* * ---------------------------------------------------------------------------- * Include all autoloaders. * ---------------------------------------------------------------------------- */ require $__DIR__ . '/bootstrap/autoload.php'; /* * ---------------------------------------------------------------------------- * Begin concrete5 startup. * ---------------------------------------------------------------------------- */ /** @var \Concrete\Core\Application\Application $cms */ $cms = require $__DIR__ . '/bootstrap/start.php'; /* * ---------------------------------------------------------------------------- * Run the runtime. * ---------------------------------------------------------------------------- */ $runtime = $cms->getRuntime(); if ($response = $runtime->run()) { /* * ------------------------------------------------------------------------ * Shut it down. * ------------------------------------------------------------------------ */ $cms->shutdown(); } else { return $cms; }
<?php require 'concrete/dispatcher.php';
Key | Value |
Version | 8.2.2b2 |
Installed Version | 8.2.2b2 |
Key | Value |
concrete.version | 8.2.2b2 |
concrete.version_installed | 8.2.2b2 |
concrete.version_db | 20170818000000 |
concrete.installed | true |
concrete.locale | en_US |
concrete.charset | UTF-8 |
concrete.maintenance_mode | false |
concrete.debug.display_errors | true |
concrete.debug.detail | debug |
concrete.proxy.host | null |
concrete.proxy.port | null |
concrete.proxy.user | null |
concrete.proxy.password | null |
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 |
concrete.interface.panel.page_relations | false |
concrete.mail.method | smtp |
concrete.mail.methods.smtp.server | smtp.gmail.com |
concrete.mail.methods.smtp.port | |
concrete.mail.methods.smtp.username | contact@istand.tv |
concrete.mail.methods.smtp.password | run2Dios2day |
concrete.mail.methods.smtp.encryption | TLS |
concrete.mail.methods.smtp.messages_per_connection | null |
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 | default |
concrete.cache.full_page_lifetime_value | null |
concrete.cache.full_contents_assets_hash | false |
concrete.cache.directory | /home/jw/sites/devstand/application/files/cache |
concrete.cache.directory_relative | null |
concrete.cache.page.directory | /home/jw/sites/devstand/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/jw/sites/devstand/application/files/cache/overrides |
concrete.cache.levels.overrides.drivers.core_filesystem.options.dirPermissions | 493 |
concrete.cache.levels.overrides.drivers.core_filesystem.options.filePermissions | 420 |
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/jw/sites/devstand/application/files/cache/expensive |
concrete.cache.levels.expensive.drivers.core_filesystem.options.dirPermissions | 493 |
concrete.cache.levels.expensive.drivers.core_filesystem.options.filePermissions | 420 |
concrete.cache.levels.object.drivers.core_ephemeral.class | \Stash\Driver\Ephemeral |
concrete.cache.clear.thumbnails | true |
concrete.design.enable_custom | true |
concrete.design.enable_layouts | true |
concrete.log.emails | true |
concrete.log.errors | true |
concrete.log.spam | false |
concrete.log.queries.log | false |
concrete.log.queries.clear_on_reload | false |
concrete.jobs.enable_scheduling | true |
concrete.filesystem.temp_directory | null |
concrete.filesystem.permissions.file | 420 |
concrete.filesystem.permissions.directory | 493 |
concrete.email.enabled | true |
concrete.email.default.address | concrete5-noreply@concrete5 |
concrete.email.default.name | |
concrete.email.form_block.address | false |
concrete.email.forgot_password.address | null |
concrete.email.forgot_password.name | null |
concrete.email.validate_registration.address | null |
concrete.email.validate_registration.name | null |
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_overlay | false |
concrete.external.news | true |
concrete.misc.user_timezones | false |
concrete.misc.package_backup_directory | /home/jw/sites/devstand/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.app_version_display_in_header | true |
concrete.misc.default_jpeg_image_compression | 80 |
concrete.misc.default_png_image_compression | 9 |
concrete.misc.default_thumbnail_format | auto |
concrete.misc.basic_thumbnailer_generation_strategy | now |
concrete.misc.help_overlay | true |
concrete.misc.require_version_comments | false |
concrete.misc.login_redirect | HOMEPAGE |
concrete.misc.access_entity_updated | 1506713463 |
concrete.misc.latest_version | 8.2.2b2 |
concrete.misc.do_page_reindex_check | false |
concrete.misc.login_redirect_cid | 0 |
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 | http://www.concrete5.org/tools/update_core |
concrete.updates.services.inspect_update | http://www.concrete5.org/tools/inspect_update |
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.results | 10 |
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.community_translation.entry_point | http://translate.concrete5.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.concrete5.org/translate/package |
concrete.urls.concrete5 | http://www.concrete5.org |
concrete.urls.concrete5_secure | https://www.concrete5.org |
concrete.urls.newsflow | http://newsflow.concrete5.org |
concrete.urls.background_feed | //backgroundimages.concrete5.org/wallpaper |
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.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.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.session.name | CONCRETE5 |
concrete.session.handler | file |
concrete.session.save_path | null |
concrete.session.max_lifetime | 7200 |
concrete.session.cookie.cookie_path | false |
concrete.session.cookie.cookie_lifetime | 0 |
concrete.session.cookie.cookie_domain | false |
concrete.session.cookie.cookie_secure | false |
concrete.session.cookie.cookie_httponly | true |
concrete.user.registration.enabled | true |
concrete.user.registration.type | enabled |
concrete.user.registration.captcha | false |
concrete.user.registration.email_registration | false |
concrete.user.registration.display_username_field | true |
concrete.user.registration.validate_email | false |
concrete.user.registration.approval | false |
concrete.user.registration.notification | 1 |
concrete.user.registration.notification_email | contact@istand.tv |
concrete.user.group.badge.default_point_value | 50 |
concrete.user.username.maximum | 64 |
concrete.user.username.minimum | 3 |
concrete.user.username.allow_spaces | false |
concrete.user.password.maximum | 128 |
concrete.user.password.minimum | 5 |
concrete.user.password.hash_portable | false |
concrete.user.password.hash_cost_log2 | 12 |
concrete.user.password.legacy_salt | |
concrete.user.private_messages.throttle_max | 20 |
concrete.user.private_messages.throttle_max_timespan | 15 |
concrete.spam.whitelist_group | 0 |
concrete.spam.notify_email | |
concrete.security.session.invalidate_on_user_agent_mismatch | true |
concrete.security.session.invalidate_on_ip_mismatch | true |
concrete.security.ban.ip.enabled | true |
concrete.security.ban.ip.attempts | 5 |
concrete.security.ban.ip.time | 300 |
concrete.security.ban.ip.length | 10 |
concrete.security.misc.x_frame_options | SAMEORIGIN |
concrete.permissions.forward_to_login | true |
concrete.permissions.model | simple |
concrete.seo.tracking.code | |
concrete.seo.tracking.code_position | bottom |
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.version_db_installed | 20170818000000 |
Key | Value |
REDIRECT_STATUS | 200 |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_HOST | istand.tv |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
SERVER_SIGNATURE | Apache/2.4.10 (Debian) Server at istand.tv Port 80 |
SERVER_SOFTWARE | Apache/2.4.10 (Debian) |
SERVER_NAME | istand.tv |
SERVER_ADDR | 108.161.134.156 |
SERVER_PORT | 80 |
REMOTE_ADDR | 54.147.110.47 |
DOCUMENT_ROOT | /home/jw/sites/devstand/ |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /home/jw/sites/devstand/ |
SERVER_ADMIN | contact@istand.tv |
SCRIPT_FILENAME | /home/jw/sites/devstand/index.php |
REMOTE_PORT | 47852 |
REDIRECT_URL | /Reviews/anxious-people |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /Reviews/anxious-people |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711486.393 |
REQUEST_TIME | 1711711486 |