Classes, traits, and interfaces - 9.5.x - drupal
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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| PhpassHashedPassword | class | Drupal\Core\Password | core/ |
Secure hashing functions based on Portable PHP password hashing framework. | 1 | 1 | 4 | |
| PhpBackend | class | Drupal\Core\Cache | core/ |
Defines a PHP cache implementation. | 2 | |||
| PhpBackendFactory | class | Drupal\Core\Cache | core/ |
2 | ||||
| PhpBackendTest | class | Drupal\KernelTests\Core\Cache | core/ |
Unit test of the PHP cache backend using the generic cache unit test base. | ||||
| PhpDeprecation | class | core/ |
This class triggers an E_DEPRECATED notice. | |||||
| PhpMail | class | Drupal\Core\Mail\Plugin\Mail | core/ |
Defines the default Drupal mail backend, using PHP's native mail() function. | 2 | 2 | ||
| PhpMailTest | class | Drupal\Tests\Core\Mail\Plugin\Mail | core/ |
@coversDefaultClass \Drupal\Core\Mail\Plugin\Mail\PhpMail[[api-linebreak]] @group Mail | ||||
| PhpRequirements | final class | Drupal\Core\Utility | core/ |
Provides an object for dynamically identifying the minimum supported PHP. | 5 | |||
| PhpRequirementsTest | class | Drupal\Tests\Core\Utility | core/ |
Tests the \Drupal\Core\Utility\PhpRequirements class. | ||||
| PhpRequirementTest | class | Drupal\Tests\system\Functional\System | core/ |
Tests the output of PHP requirements on the status report. | ||||
| PhpSelection | class | Drupal\Core\Entity\Plugin\EntityReferenceSelection | core/ |
Defines an alternative to the default Entity Reference Selection plugin. | ||||
| PhpSerialize | class | Drupal\Component\Serialization | core/ |
Default serialization for serialized PHP. | 1 | 2 | ||
| PhpStorageFactory | class | Drupal\Core\PhpStorage | core/ |
Creates a php storage object. | 5 | |||
| PhpStorageFactoryTest | class | Drupal\Tests\system\Kernel\PhpStorage | core/ |
Tests the PHP storage factory. | ||||
| PhpStorageInterface | interface | Drupal\Component\PhpStorage | core/ |
Stores and loads PHP code. | 2 | 1 | ||
| PhpStorageTestBase | abstract class | Drupal\Tests\Component\PhpStorage | core/ |
Base test for PHP storages. | 3 | |||
| PhpStreamWrapperInterface | interface | Drupal\Core\StreamWrapper | core/ |
Defines a generic PHP stream wrapper interface. | 1 | |||
| PhpTransliteration | class | Drupal\Core\Transliteration | core/ |
Enhances PhpTransliteration with an alter hook. | 1 | 2 | ||
| PhpTransliteration | class | Drupal\Component\Transliteration | core/ |
Implements transliteration without using the PECL extensions. | 1 | 3 | ||
| PhpTransliterationTest | class | Drupal\Tests\Component\Transliteration | core/ |
Tests Transliteration component functionality. | ||||
| PhpTransliterationTest | class | Drupal\Tests\Core\Transliteration | core/ |
Tests Transliteration component functionality. | ||||
| PhpUnitAutoloaderTest | class | Drupal\Tests\Core\Test | core/ |
Tests that classes are correctly loaded during PHPUnit initialization. | ||||
| PhpUnitBridgeIsolatedTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors in process isolation. | ||||
| PhpUnitBridgeRequiresTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors. | ||||
| PhpUnitBridgeTest | class | Drupal\FunctionalTests\Core\Test | core/ |
Tests Drupal's integration with Symfony PHPUnit Bridge. | ||||
| PhpUnitBridgeTest | class | Drupal\Tests\Core\Test | core/ |
Test how unit tests interact with deprecation errors. | ||||
| PhpUnitBridgeTest | class | Drupal\KernelTests\Core\Test | core/ |
Test how kernel tests interact with deprecation errors. | ||||
| PhpUnitCliTest | class | Drupal\Tests\Core\Test | core/ |
@group TestSuites @group Test | ||||
| PhpUnitTestDummyClass | class | Drupal\phpunit_test | core/ |
|||||
| PhpUnitTestRunner | class | Drupal\Core\Test | core/ |
Run PHPUnit-based tests. | 1 | |||
| PhpUnitTestRunnerTest | class | Drupal\Tests\Core\Test | core/ |
@coversDefaultClass \Drupal\Core\Test\PhpUnitTestRunner[[api-linebreak]] @group Test | ||||
| PhpUnitWarnings | trait | Drupal\Tests\Traits | core/ |
Converts deprecation warnings added by PHPUnit to silenced deprecations. | 11 | |||
| PhpUnitWarningsTest | class | Drupal\Tests | core/ |
@coversDefaultClass \Drupal\Tests\Traits\PhpUnitWarnings[[api-linebreak]] @group legacy | ||||
| PirateDayCacheabilityMetadataConfigOverride | class | Drupal\config_override_test | core/ |
Test implementation of a config override that provides cacheability metadata. | 2 | |||
| PirateDayCacheContext | class | Drupal\config_override_test\Cache | core/ |
Defines the PirateDayCacheContext service that allows to cache the booty. | 2 | 2 | ||
| PlaceholderGenerator | class | Drupal\Core\Render | core/ |
Turns a render array into a placeholder. | 1 | 2 | ||
| PlaceholderGeneratorInterface | interface | Drupal\Core\Render | core/ |
Defines an interface for turning a render array into a placeholder. | 1 | |||
| PlaceholderGeneratorTest | class | Drupal\Tests\Core\Render | core/ |
@coversDefaultClass \Drupal\Core\Render\PlaceholderGenerator[[api-linebreak]] @group Render | ||||
| PlaceholderingRenderCache | class | Drupal\Core\Render | core/ |
Adds automatic placeholdering to the RenderCache. | 1 | 2 | ||
| PlaceholderInterface | interface | Drupal\Core\Database\Query | core/ |
Interface for a query that accepts placeholders. | 3 | 2 | ||
| PlaceholderMessageTest | class | Drupal\Tests\system\Functional\Render | core/ |
Functional test verifying that messages set in placeholders always appear. | ||||
| PlaceholdersTest | class | Drupal\Tests\Core\Render | core/ |
|||||
| PlaceholderStrategyInterface | interface | Drupal\Core\Render\Placeholder | core/ |
Provides an interface for defining a placeholder strategy service. | 3 | 2 | ||
| PlainTextEditor | class | Drupal\quickedit\Plugin\InPlaceEditor | core/ |
Defines the plain text in-place editor. | ||||
| PlainTextOutput | class | Drupal\Component\Render | core/ |
Provides an output strategy for transforming HTML into simple plain text. | 17 | |||
| PlainTextOutputTest | class | Drupal\Tests\Component\Render | core/ |
@coversDefaultClass \Drupal\Component\Render\PlainTextOutput[[api-linebreak]] @group Utility | ||||
| Plugin | class | Drupal\Component\Annotation | core/ |
Defines a Plugin annotation object. | 47 | 46 | ||
| Plugin | class | Drupal\Composer\Plugin\Scaffold | composer/ |
Composer plugin for handling drupal scaffold. | ||||
| PluginAlterTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
@group Render | ||||
| PluginAwareInterface | interface | Drupal\Component\Plugin | core/ |
Provides an interface for objects that depend on a plugin. | 4 | 6 |
Pagination
- Previous page
- Page 130
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.