Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
Primary tabs
Introduction to classes
A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.
See also
Objected-oriented programming conventions
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
MissingGroupException | class | Drupal\Core\Test\Exception | core/ |
Exception thrown when a test class is missing an @group annotation. | 1 | |||
MissingInputException | class | Symfony\Component\Console\Exception | vendor/ |
Represents failure to read input from stdin. | 1 | |||
MissingMandatoryParametersException | class | Symfony\Component\Routing\Exception | vendor/ |
Exception thrown when a route cannot be generated because of missing mandatory parameters. | 6 | |||
MissingOptionsException | class | Symfony\Component\Validator\Exception | vendor/ |
6 | ||||
MissingThemeDependencyException | class | Drupal\Core\Theme | core/ |
Exception to be thrown when base theme for installed theme is not installed. | ||||
MissingValueContextException | class | Drupal\Component\Plugin\Exception | core/ |
An exception class thrown when contexts exist but are missing a value. | 2 | |||
MixedPart | final class | Symfony\Component\Mime\Part\Multipart | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 2 | |||
MixedType | final class | SebastianBergmann\Type | vendor/ |
|||||
Mixed_ | final class | phpDocumentor\Reflection\Types | vendor/ |
Value Object representing an unknown, or mixed, type. | 9 | |||
Mixin | class | Google\Protobuf | vendor/ |
Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: | ||||
Mixin | final class | phpDocumentor\Reflection\DocBlock\Tags | vendor/ |
Reflection class for a {mixin tag in a Docblock. | 1 | |||
Mixin | trait | Webmozart\Assert | vendor/ |
This trait provides nurllOr*, all* and allNullOr* variants of assertion base methods. Do not use this trait directly: it will change, and is not designed for reuse. | ||||
MixinTagValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
1 | ||||
MockArraySessionStorage | class | Symfony\Component\HttpFoundation\Session\Storage | vendor/ |
MockArraySessionStorage mocks the session for unit tests. | 1 | 2 | ||
MockBuilder | final class | PHPUnit\Framework\MockObject | vendor/ |
@psalm-template MockedType | 2 | |||
MockBuilderDynamicReturnTypeExtension | class | PHPStan\Type\PHPUnit | vendor/ |
|||||
MockClass | final class | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockClientStrategy | final class | Http\Discovery\Strategy | vendor/ |
Find the Mock client. | ||||
MockFileFinder | class | Drupal\Component\Annotation\Reflection | core/ |
Defines a mock file finder that only returns a single filename. | 5 | |||
MockFileSessionStorage | class | Symfony\Component\HttpFoundation\Session\Storage | vendor/ |
MockFileSessionStorage is used to mock sessions for functional testing where you may need to persist session data across separate PHP processes. | ||||
MockFileSessionStorageFactory | class | Symfony\Component\HttpFoundation\Session\Storage | vendor/ |
@author Jérémy Derussé <jeremy@derusse.com> | ||||
MockHandler | class | GuzzleHttp\Handler | vendor/ |
Handler that returns responses or throw exceptions from a queue. | ||||
MockMethod | final class | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockMethodCallRule | class | PHPStan\Rules\PHPUnit | vendor/ |
@implements Rule<MethodCall> | ||||
MockMethodSet | final class | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockObject | interface | PHPUnit\Framework\MockObject | vendor/ |
@method InvocationMocker method($constraint) | 1 | 5 | ||
MockObjectApi | trait | PHPUnit\Framework\MockObject | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
MockObjectComparator | final class | SebastianBergmann\Comparator | vendor/ |
Compares PHPUnit\Framework\MockObject\MockObject instances for equality. | ||||
MockObjectCreated | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
MockObjectCreatedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockObjectDynamicReturnTypeExtension | class | PHPStan\Type\PHPUnit | vendor/ |
|||||
MockObjectForAbstractClassCreated | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
MockObjectForAbstractClassCreatedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockObjectForIntersectionOfInterfacesCreated | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
MockObjectForIntersectionOfInterfacesCreatedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockObjectForTraitCreated | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
MockObjectForTraitCreatedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockObjectFromWsdlCreated | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
MockObjectFromWsdlCreatedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
MockObjectInternal | interface | PHPUnit\Framework\MockObject | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
MockObjectTypeNodeResolverExtension | class | PHPStan\PhpDoc\PHPUnit | vendor/ |
|||||
MockPhpStorage | class | Drupal\system\PhpStorage | core/ |
Mock PHP storage class used for testing. | ||||
MockTrait | https://github.com/sebastianbergmann/phpunit/issues/5243 |
final class | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | |||
MockType | interface | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | |||
Mod | class | PhpParser\Node\Expr\BinaryOp | vendor/ |
|||||
Mod | class | PhpParser\Node\Expr\AssignOp | vendor/ |
|||||
ModalRenderer | class | Drupal\Core\Render\MainContent | core/ |
Default main content renderer for modal dialog requests. | ||||
ModBinary | class | Twig\Node\Expression\Binary | vendor/ |
1 | ||||
ModeratedContentController | class | Drupal\content_moderation\Controller | core/ |
Defines a controller to list moderated nodes. | ||||
ModeratedNodeListBuilder | class | Drupal\content_moderation | core/ |
Defines a class to build a listing of moderated node entities. | 1 |