Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns the name of the class of an object
<?php get_class(object $object = ?): string
<?php sprintf(
"Option 'platform' must be a subtype of '%s', instance of '%s' given",
AbstractPlatform::class,
get_class($invalidPlatform)
)
);
}
<?php public static function typeNotRegistered(Type $type): self
{
return new self(
sprintf('Type of the class %s@%s is not registered.', get_class($type), spl_object_hash($type))
);
}
<?php public static function typeAlreadyRegistered(Type $type): self
{
return new self(
sprintf('Type of the class %s@%s is already registered.', get_class($type), spl_object_hash($type))
);
}
}
<?php $changedProperties = [];
if (get_class($properties1['type']) !== get_class($properties2['type'])) {
$changedProperties[] = 'type';
}
<?php }
if ($maxDepth === 0) {
return is_object($var) ? get_class($var)
: (is_array($var) ? 'Array(' . count($var) . ')' : $var);
}
<?php $return = new stdClass();
if ($var instanceof DateTimeInterface) {
$return->__CLASS__ = get_class($var);
$return->date = $var->format('c');
$return->timezone = $var->getTimezone()->getName();
<?php private static function getClass($object): string
{
$class = get_class($object);
if (! class_exists(Proxy::class)) {
return $class;
<?php return new self(sprintf(
'Could not convert PHP value of type %s to type %s. Expected one of the following types: %s',
is_object($value) ? get_class($value) : gettype($value),
$toType,
implode(', ', $possibleTypes)
), 0, $previous);
<?php public static function conversionFailedSerialization($value, $format, $error)
{
$actualType = is_object($value) ? get_class($value) : gettype($value);
return new self(sprintf(
"Could not convert PHP type '%s' to '%s', as an '%s' error was triggered by the serialization",
<?php {
return array_map(
static function (Type $type): string {
return get_class($type);
},
self::getTypeRegistry()->getMap()
);
<?php );
foreach ($data as $item) {
$generatedVersion = get_class($this->driver->createDatabasePlatformForVersion($item[0]));
self::assertSame(
$item[1],
<?php public function testCustomWrapper(): void
{
$wrapper = $this->createMock(Connection::class);
$wrapperClass = get_class($wrapper);
$options = [
'url' => 'sqlite::memory:',
<?php public function databaseUrls(): iterable
{
$driver = $this->createMock(Driver::class);
$driverClass = get_class($driver);
return [
'simple URL' => [
<?php ) {
self::markTestSkipped(sprintf(
'The underlying implementation of the %s driver does not check the query to be prepared server-side.',
get_class($driver)
));
}
<?php $platform = $this->connection->getDatabasePlatform();
if (! $this->supportsPlatform($platform)) {
self::markTestSkipped(sprintf('Skipping since connected to %s', get_class($platform)));
}
$this->schemaManager = $this->connection->getSchemaManager();