PhpArrayContainer::resolveServicesAndParameters

protected PhpArrayContainer::resolveServicesAndParameters($arguments) Resolves arguments that represent services or variables to the real values. Parameters array|\stdClass $arguments: The arguments to resolve. Return value array The resolved arguments. Throws \Symfony\Component\DependencyInjection\Exception\RuntimeException If a parameter/service could not be resolved. \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException If an unknown type is met while resolving paramet

PhpArrayContainer::createService

protected PhpArrayContainer::createService(array $definition, $id) Creates a service from a service definition. Parameters array $definition: The service definition to create a service from. string $id: The service identifier, necessary so it can be shared if its public. Return value object The service described by the service definition. Throws \Symfony\Component\DependencyInjection\Exception\RuntimeException Thrown when the service is a synthetic service. \Symfony\Component\DependencyInjec

PhpArrayContainer

Provides a container optimized for Drupal's needs. This container implementation is compatible with the default Symfony dependency injection container and similar to the Symfony ContainerBuilder class, but optimized for speed. It is based on a human-readable PHP array container definition with a structure very similar to the YAML container definition. Hierarchy class \Drupal\Component\DependencyInjection\Container implements IntrospectableContainerInterface, ResettableContainerInterfaceclass \D

Php::generate

public Php::generate() Generates a Universally Unique IDentifier (UUID). Return value A 16 byte integer represented as a hex string formatted with 4 hyphens. Overrides UuidInterface::generate File core/lib/Drupal/Component/Uuid/Php.php, line 18 Class Php Generates a UUID v4 (RFC 4122 section 4.4) using PHP code. Namespace Drupal\Component\Uuid Code public function generate() { // Obtain a random string of 32 hex characters. $hex = bin2hex(Crypt::randomBytes(16)); // The variabl

PHP wrapper functions

Functions that are wrappers or custom implementations of PHP functions. Certain PHP functions should not be used in Drupal. Instead, Drupal's replacement functions should be used. For example, for improved or more secure UTF8-handling, or RFC-compliant handling of URLs in Drupal. For ease of use and memorizing, all these wrapper functions use the same name as the original PHP function, but prefixed with "drupal_". Beware, however, that not all wrapper functions support the same arguments as the

PHP Runtime Assert Statements

Use of the assert() statement in Drupal. Unit tests also use the term "assertion" to refer to test conditions, so to avoid confusion the term "runtime assertion" will be used for the assert() statement throughout the documentation. A runtime assertion is a statement that is expected to always be true at the point in the code it appears at. They are tested using PHP's internal assert() statement. If an assertion is ever FALSE it indicates an error in the code or in module or theme configuration

Php

Generates a UUID v4 (RFC 4122 section 4.4) using PHP code. Hierarchy class \Drupal\Component\Uuid\Php implements UuidInterface See also http://www.rfc-editor.org/rfc/rfc4122.txt http://www.rfc-editor.org/errata_search.php?rfc=4122&eid=3546 File core/lib/Drupal/Component/Uuid/Php.php, line 13 Namespace Drupal\Component\Uuid Members Name Modifiers Type Description Php::generate public function Generates a Universally Unique IDentifier (UUID). Overrides UuidInterface::

PersistentDatabaseLockBackend::__construct

public PersistentDatabaseLockBackend::__construct(Connection $database) Constructs a new PersistentDatabaseLockBackend. Parameters \Drupal\Core\Database\Connection $database: The database connection. Overrides DatabaseLockBackend::__construct File core/lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php, line 21 Class PersistentDatabaseLockBackend Defines the persistent database lock backend. This backend is global for this Drupal installation. Namespace Drupal\Core\Lock Code publi

PersistentDatabaseLockBackend

Defines the persistent database lock backend. This backend is global for this Drupal installation. Hierarchy class \Drupal\Core\Lock\LockBackendAbstract implements LockBackendInterfaceclass \Drupal\Core\Lock\DatabaseLockBackendclass \Drupal\Core\Lock\PersistentDatabaseLockBackend Related topics Locking mechanisms Functions to coordinate long-running operations across requests. File core/lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php, line 13 Namespace Drupal\Core\Lock Membe

PermissionsHashGeneratorInterface::generate

public PermissionsHashGeneratorInterface::generate(AccountInterface $account) Generates a hash that uniquely identifies a user's permissions. Parameters \Drupal\Core\Session\AccountInterface $account: The user account for which to get the permissions hash. Return value string A permissions hash. File core/lib/Drupal/Core/Session/PermissionsHashGeneratorInterface.php, line 19 Class PermissionsHashGeneratorInterface Defines the user permissions hash generator interface. Namespace Drupal