~ K A L I ~
UNAME : Linux web65.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64SERVER IP : 10.0.187.65 -________-
CLIENT IP : 216.73.216.230 MINI SHELL D ZAB '
Current File : //home/phpmyadmin-www/libraries/classes/Dbal/DatabaseName.php |
<?php
declare(strict_types=1);
namespace PhpMyAdmin\Dbal;
use Stringable;
use Webmozart\Assert\Assert;
use Webmozart\Assert\InvalidArgumentException;
/**
* @psalm-immutable
*/
final class DatabaseName implements Stringable
{
/**
* @see https://dev.mysql.com/doc/refman/en/identifier-length.html
* @see https://mariadb.com/kb/en/identifier-names/#maximum-length
*/
private const MAX_LENGTH = 64;
/**
* @var string
* @psalm-var non-empty-string
*/
private $name;
/**
* @param mixed $name
*
* @throws InvalidArgumentException
*/
private function __construct($name)
{
Assert::stringNotEmpty($name);
Assert::maxLength($name, self::MAX_LENGTH);
Assert::notEndsWith($name, ' ');
$this->name = $name;
}
/**
* @param mixed $name
*
* @throws InvalidArgumentException
*/
public static function fromValue($name): self
{
return new self($name);
}
/**
* @psalm-return non-empty-string
*/
public function getName(): string
{
return $this->name;
}
/**
* @psalm-return non-empty-string
*/
public function __toString(): string
{
return $this->name;
}
}
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com