3 namespace Drupal\Driver;
8 interface DriverInterface {
11 * Returns a random generator.
13 public function getRandom();
16 * Bootstraps operations, as needed.
18 public function bootstrap();
21 * Determines if the driver has been bootstrapped.
23 public function isBootstrapped();
28 public function userCreate(\stdClass $user);
33 public function userDelete(\stdClass $user);
36 * Processes a batch of actions.
38 public function processBatch();
41 * Adds a role for a user.
43 * @param \stdClass $user
46 * The role name to assign.
48 public function userAddRole(\stdClass $user, $role);
51 * Retrieves watchdog entries.
54 * Number of entries to retrieve.
56 * Filter by watchdog type.
57 * @param string $severity
58 * Filter by watchdog severity level.
63 public function fetchWatchdog($count = 10, $type = NULL, $severity = NULL);
66 * Clears Drupal caches.
69 * Type of cache to clear defaults to all.
71 public function clearCache($type = NULL);
74 * Clears static Drupal caches.
76 public function clearStaticCaches();
82 * Fully loaded node object.
85 * The node object including the node ID in the case of new nodes.
87 public function createNode($node);
93 * Fully loaded node object.
95 public function nodeDelete($node);
100 public function runCron();
103 * Creates a taxonomy term.
105 * @param \stdClass $term
109 * The term object including the term ID in the case of new terms.
111 public function createTerm(\stdClass $term);
114 * Deletes a taxonomy term.
116 * @param \stdClass $term
117 * Term object to delete.
120 * Status constant indicating deletion.
122 public function termDelete(\stdClass $term);
127 * @param array $permissions
128 * An array of permissions to create the role with.
131 * Role name of newly created role.
133 public function roleCreate(array $permissions);
139 * A role name to delete.
141 public function roleDelete($rid);
144 * Check if the specified field is an actual Drupal field.
146 * @param string $entity_type
147 * The entity type to which the field should belong.
148 * @param string $field_name
149 * The name of the field.
152 * TRUE if the field exists in the entity type, FALSE if not.
154 public function isField($entity_type, $field_name);
157 * Returns a configuration item.
159 * @param string $name
160 * The name of the configuration object to retrieve.
162 * A string that maps to a key within the configuration data.
165 * The data that was requested.
167 public function configGet($name, $key);
170 * Sets a value in a configuration object.
172 * @param string $name
173 * The name of the configuration object.
175 * Identifier to store value in configuration.
176 * @param mixed $value
177 * Value to associate with identifier.
179 public function configSet($name, $key, $value);