Asserts that a class exists.

@param string $className
17017
final protected function assertClassExists(string $className): void
    {
        self::assertTrue(\class_exists($className), \sprintf(
            'Failed asserting that a class "%s" exists.',
            $className
        ));
    }
264376
public function isClass($className)
    {
        foreach ($this->definitions as $key => $value) {
            if (!strcasecmp($key, $className) && 'class' === $value->getType()) {
                return true;
            }
        }

        /*
         * Try to autoload the class from an external dependency
         */
        if (\count($this->externalDependencies)) {
            foreach ($this->externalDependencies as $namespace => $location) {
                if (preg_match('#^'.$namespace.'\\\\#i', $className)) {
                    return $this->loadExternalClass($className, $location);
                }
            }
        }

        return false;
    }
987521
protected static function eventClassCheck(string $className) : void
    {
        if (!class_exists($className) || !is_subclass_of($className, EventInterface::class)) {
            throw new ClassNotImplementsEventInterfaceException($className);
        }
    }
572636
public function isValidDriverClass($className)
    {
        if (!class_exists($className)) {
            return false;
        }

        if (!is_subclass_of($className, 'Bex\\Behat\\ExtensionDriverLocator\\DriverInterface')) {
            return false;
        }

        if (!empty($this->parent) && !is_subclass_of($className, $this->parent)) {
            return false;
        }

        return true;
    }
679046
public function isTransient($className)
    {
        $fileName = str_replace('\\', '.', $className) . $this->fileExtension;

        // Check whether file exists
        foreach ((array) $this->paths as $path) {
            if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
                return false;
            }
        }

        return true;
    }
947406
public function isValidConfigurator($className)
    {
        //====================================================================//
        // Verify Class Exists
        if (false == class_exists($className)) {
            return Splash::log()->err('Configurator Class Not Found: '.$className);
        }

        //====================================================================//
        // Verify Configurator Class Extends ConfiguratorInterface
        try {
            $class = new $className();
            if (!($class instanceof ConfiguratorInterface)) {
                return Splash::log()->err(Splash::trans('ErrLocalInterface', $className, ConfiguratorInterface::class));
            }
        } catch (Exception $exc) {
            echo $exc->getMessage();

            return Splash::log()->err($exc->getMessage());
        }

        return true;
    }
546253
public function setClassName($className)
    {
        try {
            $classFilename = ClassLoader::getInstance()->findClass($className);
            if (!file_exists($classFilename)) {
                throw new BootstrapException('The provided callback class "' . $className . '" does not exist.');
            } else {
                $this->className = $className;
            }
        } catch (\Exception $e) {
            throw $e;
        }
    }
1070463
final protected function assertClassSatisfiesSpecification(callable $specification, string $className, string $message = ''): void
    {
        $this->assertClassExists($className);

        self::assertTrue($specification($className), \sprintf(
            '' !== $message ? $message : 'Failed asserting that class "%s" satisfies a specification.',
            $className
        ));
    }
1296189
protected function hookExists($className, array $hookData)
    {
        $class = preg_replace('/^.*\\\(.*)$/', '$1', $className);

        foreach ($hookData as $hookData) {
            if (preg_match('/\\\\'.$class.'$/', $hookData['className'])) {
                return true;
            }
        }

        return false;
    }
648145
public static function loader($className) {		
		if(!isset(self::$loader_cache)) {
			self::buildLoaderCache();
		}
		
		if(isset(self::$loader_cache[$className])) {
			require_once(self::$loader_cache[$className]);
			return true;
		}
		else {
			return false;
		}
	}
772055
public function load($className) {
        if (class_exists($className, FALSE) || interface_exists($className, FALSE)) {
            return;
        }

        foreach ($this->dirs as $dir) {
            if ($this->loadClass($this->basePath . DIRECTORY_SEPARATOR . $dir, $className)) {
                return;
            }
    	}
    }
509790
public static function classExists($className, $namespace)
    {
        if (class_exists($className)) {
            return $className;
        }

        // add namespace
        $className = sprintf('%s%s', static::getFormatNamespace($namespace, true), $className);

        if (class_exists($className)) {
            return $className;
        }

        return false;
    }
86902
public function isInstanceOf($className)
    {
        $this->doCheck(function ($value) use ($className) {
            $this->throwExceptionIfFalse(
                $value instanceof $className,
                'Failed assertion that %s is an instance of %s', $value, $className
            );
        });

        return $this;
    }
54989
public function canCreate(string $className): bool
    {
        return !empty($this->entityManager->getClassMetadata($className)->associationMappings);
    }
953823
public function hasAttributeClass($className)
    {
        if ( ! $this->offsetExists('class')) {
            $this->storage[ 'class' ] = [];
        }

        return in_array($className, $this->storage[ 'class' ]);
    }
809072
public function setClassName(string $className): self
    {
        if (!class_exists($className)) {
            throw new \InvalidArgumentException(sprintf(
                'Class %s does not exist',
                $className
            ));
        }
        $this->className = $className;

        return $this;
    }
969143
public function hasClass($className)
    {
        if ($this->hasAttribute('class')) {
            return in_array($className, preg_split('/\s+/', $this->getAttribute('class')));
        }

        return false;
    }