Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Assert.php

function Assert::classExists

@psalm-assert class-string $value

Parameters

mixed $value:

string $message:

Throws

InvalidArgumentException

1 call to Assert::classExists()
StandardTagFactory::registerTagHandler in vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php
Registers a handler for tags.

File

vendor/webmozart/assert/src/Assert.php, line 1515

Class

Assert
Efficient assertions to validate the input/output of your methods.

Namespace

Webmozart\Assert

Code

public static function classExists($value, $message = '') {
    if (!\class_exists($value)) {
        static::reportInvalidArgument(\sprintf($message ?: 'Expected an existing class name. Got: %s', static::valueToString($value)));
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal