Commit 1e15efd7 authored by alexpott's avatar alexpott
Browse files

Issue #2202629 by sun: Move Drupal\Core\KeyValueStore\State* into Drupal\Core\State\State*.

parent 3a7d54dc
......@@ -141,7 +141,7 @@ services:
factory_class: Drupal\Component\Utility\Settings
factory_method: getInstance
state:
class: Drupal\Core\KeyValueStore\State
class: Drupal\Core\State\State
arguments: ['@keyvalue']
queue:
class: Drupal\Core\Queue\QueueFactory
......
......@@ -336,7 +336,7 @@ public static function keyValue($collection) {
* needs to be the same across development, production, etc. environments
* (for example, the system maintenance message) should use \Drupal::config() instead.
*
* @return \Drupal\Core\KeyValueStore\StateInterface
* @return \Drupal\Core\State\StateInterface
*/
public static function state() {
return static::$container->get('state');
......
......@@ -6,7 +6,7 @@
namespace Drupal\Core\Asset;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
/**
* Optimizes CSS assets.
......@@ -37,7 +37,7 @@ class CssCollectionOptimizer implements AssetCollectionOptimizerInterface {
/**
* The state key/value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -50,7 +50,7 @@ class CssCollectionOptimizer implements AssetCollectionOptimizerInterface {
* The optimizer for a single CSS asset.
* @param \Drupal\Core\Asset\AssetDumperInterface
* The dumper for optimized CSS assets.
* @param \Drupal\Core\KeyValueStore\StateInterface
* @param \Drupal\Core\State\StateInterface
* The state key/value store.
*/
public function __construct(AssetCollectionGrouperInterface $grouper, AssetOptimizerInterface $optimizer, AssetDumperInterface $dumper, StateInterface $state) {
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Asset;
use Drupal\Component\Utility\String;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
/**
* Renders CSS assets.
......@@ -17,14 +17,14 @@ class CssCollectionRenderer implements AssetCollectionRendererInterface {
/**
* The state key/value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs a CssCollectionRenderer.
*
* @param \Drupal\Core\KeyValueStore\StateInterface
* @param \Drupal\Core\State\StateInterface
* The state key/value store.
*/
public function __construct(StateInterface $state) {
......
......@@ -6,7 +6,7 @@
namespace Drupal\Core\Asset;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
/**
......@@ -38,7 +38,7 @@ class JsCollectionOptimizer implements AssetCollectionOptimizerInterface {
/**
* The state key/value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -51,7 +51,7 @@ class JsCollectionOptimizer implements AssetCollectionOptimizerInterface {
* The optimizer for a single JS asset.
* @param \Drupal\Core\Asset\AssetDumperInterface
* The dumper for optimized JS assets.
* @param \Drupal\Core\KeyValueStore\StateInterface
* @param \Drupal\Core\State\StateInterface
* The state key/value store.
*/
public function __construct(AssetCollectionGrouperInterface $grouper, AssetOptimizerInterface $optimizer, AssetDumperInterface $dumper, StateInterface $state) {
......
......@@ -6,7 +6,7 @@
namespace Drupal\Core\Asset;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Component\Utility\Json;
/**
......@@ -17,14 +17,14 @@ class JsCollectionRenderer implements AssetCollectionRendererInterface {
/**
* The state key/value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs a CssCollectionRenderer.
*
* @param \Drupal\Core\KeyValueStore\StateInterface
* @param \Drupal\Core\State\StateInterface
* The state key/value store.
*/
public function __construct(StateInterface $state) {
......
......@@ -8,7 +8,7 @@
namespace Drupal\Core;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\Queue\QueueFactory;
use Drupal\Core\Session\AccountProxyInterface;
......@@ -44,7 +44,7 @@ class Cron implements CronInterface {
/**
* The state service.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -71,7 +71,7 @@ class Cron implements CronInterface {
* The lock service.
* @param \Drupal\Core\Queue\QueueFactory $queue_factory
* The queue service.
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state service.
* @param \Drupal\Core\Session\AccountProxyInterface $current_user
* The current user.
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\EventSubscriber;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Core\Routing\RouteBuildEvent;
use Drupal\Core\Routing\RoutingEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
......@@ -31,14 +31,14 @@ class PathRootsSubscriber implements EventSubscriberInterface {
/**
* The state key value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs a new PathRootsSubscriber instance.
*
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state key value store.
*/
public function __construct(StateInterface $state) {
......
......@@ -8,7 +8,7 @@
namespace Drupal\Core\Extension;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
/**
* Class that manages enabled modules in a Drupal installation.
......@@ -18,7 +18,7 @@ class CachedModuleHandler extends ModuleHandler implements CachedModuleHandlerIn
/**
* State key/value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Cache\CacheCollector;
use Drupal\Core\Database\Connection;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Core\Lock\LockBackendInterface;
/**
......@@ -21,7 +21,7 @@ class AliasWhitelist extends CacheCollector implements AliasWhitelistInterface {
/**
* The Key/Value Store to use for state.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -41,7 +41,7 @@ class AliasWhitelist extends CacheCollector implements AliasWhitelistInterface {
* The cache backend.
* @param \Drupal\Core\Lock\LockBackendInterface $lock
* The lock backend.
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state keyvalue store.
* @param \Drupal\Core\Path\AliasStorageInterface $alias_storage
* The alias storage service.
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Component\Utility\Crypt;
/**
......@@ -18,14 +18,14 @@ class PrivateKey {
/**
* The state service.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs the token generator.
*
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state service.
*/
function __construct(StateInterface $state) {
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Routing;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\Routing\RouteCollection;
use Drupal\Core\Database\Connection;
......@@ -34,7 +34,7 @@ class MatcherDumper implements MatcherDumperInterface {
/**
* The state.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -51,7 +51,7 @@ class MatcherDumper implements MatcherDumperInterface {
* @param \Drupal\Core\Database\Connection $connection
* The database connection which will be used to store the route
* information.
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state.
* @param string $table
* (optional) The table to store the route info in. Defaults to 'router'.
......
......@@ -9,7 +9,7 @@
use Drupal\Component\Discovery\YamlDiscovery;
use Drupal\Core\Controller\ControllerResolverInterface;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\RouteCollection;
......
......@@ -8,7 +8,7 @@
namespace Drupal\Core\Routing;
use Drupal\Core\ContentNegotiation;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\KernelEvent;
......@@ -33,7 +33,7 @@ class RoutePreloader implements EventSubscriberInterface {
/**
* The state key value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -56,7 +56,7 @@ class RoutePreloader implements EventSubscriberInterface {
*
* @param \Drupal\Core\Routing\RouteProviderInterface $route_provider
* The route provider.
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state key value store.
* @param \Drupal\Core\ContentNegotiation $negotiation
* The content negotiation.
......
......@@ -8,7 +8,7 @@
namespace Drupal\Core\Routing;
use Drupal\Component\Utility\String;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
......@@ -46,7 +46,7 @@ class RouteProvider implements RouteProviderInterface, EventSubscriberInterface
/**
* The state.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -64,7 +64,7 @@ class RouteProvider implements RouteProviderInterface, EventSubscriberInterface
* A database connection object.
* @param \Drupal\Core\Routing\RouteBuilderInterface $route_builder
* The route builder.
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state.
* @param string $table
* The table in the database to use for matching.
......
......@@ -2,10 +2,12 @@
/**
* @file
* Contains Drupal\Core\KeyValueStore\StateInterface.
* Contains \Drupal\Core\State\State.
*/
namespace Drupal\Core\KeyValueStore;
namespace Drupal\Core\State;
use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
/**
* Provides the state system using a key value store.
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains Drupal\Core\KeyValueStore\StateInterface.
* Contains \Drupal\Core\State\StateInterface.
*/
namespace Drupal\Core\KeyValueStore;
namespace Drupal\Core\State;
/**
* Defines the interface for the state system.
......
......@@ -12,7 +12,7 @@
use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\user\EntityOwnerInterface;
......@@ -42,7 +42,7 @@ class CommentStatistics implements CommentStatisticsInterface {
/**
* The state service.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
......@@ -55,7 +55,7 @@ class CommentStatistics implements CommentStatisticsInterface {
* The current logged in user.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager service.
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state service.
*/
public function __construct(Connection $database, AccountInterface $current_user, EntityManagerInterface $entity_manager, StateInterface $state) {
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Config\ConfigCrudEvent;
use Drupal\Core\Config\ConfigEvents;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class EventSubscriber implements EventSubscriberInterface {
......@@ -18,14 +18,14 @@ class EventSubscriber implements EventSubscriberInterface {
/**
* The state key value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs the Event Subscriber object.
*
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The state key value store.
*/
public function __construct(StateInterface $state) {
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Config\ConfigCrudEvent;
use Drupal\Core\Config\ConfigEvents;
use Drupal\Core\Config\ConfigImporterEvent;
use Drupal\Core\KeyValueStore\StateInterface;
use Drupal\Core\State\StateInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
......@@ -21,14 +21,14 @@ class EventSubscriber implements EventSubscriberInterface {
/**
* The key value store.
*
* @var \Drupal\Core\KeyValueStore\StateInterface
* @var \Drupal\Core\State\StateInterface
*/
protected $state;
/**
* Constructs the event subscriber.
*
* @param \Drupal\Core\KeyValueStore\StateInterface $state
* @param \Drupal\Core\State\StateInterface $state
* The key value store.
*/
public function __construct(StateInterface $state) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment