Linux sg77.dns-private.com 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
LiteSpeed
Server IP : 135.181.230.13 & Your IP : 216.73.217.69
Domains :
Cant Read [ /etc/named.conf ]
User : pilasate
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
pilasate /
pilasa-core /
vendor /
symfony /
uid /
Delete
Unzip
Name
Size
Permission
Date
Action
Command
[ DIR ]
drwxr-xr-x
2024-07-17 14:08
Factory
[ DIR ]
drwxr-xr-x
2024-07-17 14:08
AbstractUid.php
4.83
KB
-rw-r--r--
2024-05-31 05:49
BinaryUtil.php
5.89
KB
-rw-r--r--
2024-05-31 05:49
CHANGELOG.md
960
B
-rw-r--r--
2024-05-31 05:49
LICENSE
1.04
KB
-rw-r--r--
2024-05-31 05:49
MaxUlid.php
383
B
-rw-r--r--
2024-05-31 05:49
MaxUuid.php
415
B
-rw-r--r--
2024-05-31 05:49
NilUlid.php
383
B
-rw-r--r--
2024-05-31 05:49
NilUuid.php
472
B
-rw-r--r--
2024-05-31 05:49
README.md
604
B
-rw-r--r--
2024-05-31 05:49
TimeBasedUidInterface.php
519
B
-rw-r--r--
2024-05-31 05:49
Ulid.php
6.86
KB
-rw-r--r--
2024-05-31 05:49
Uuid.php
5.69
KB
-rw-r--r--
2024-05-31 05:49
UuidV1.php
2.03
KB
-rw-r--r--
2024-05-31 05:49
UuidV3.php
592
B
-rw-r--r--
2024-05-31 05:49
UuidV4.php
932
B
-rw-r--r--
2024-05-31 05:49
UuidV5.php
592
B
-rw-r--r--
2024-05-31 05:49
UuidV6.php
2.02
KB
-rw-r--r--
2024-05-31 05:49
UuidV7.php
5
KB
-rw-r--r--
2024-05-31 05:49
UuidV8.php
573
B
-rw-r--r--
2024-05-31 05:49
composer.json
922
B
-rw-r--r--
2024-05-31 05:49
Save
Rename
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Uid; /** * @author Nicolas Grekas <p@tchwork.com> */ abstract class AbstractUid implements \JsonSerializable, \Stringable { /** * The identifier in its canonic representation. */ protected $uid; /** * Whether the passed value is valid for the constructor of the current class. */ abstract public static function isValid(string $uid): bool; /** * Creates an AbstractUid from an identifier represented in any of the supported formats. * * @throws \InvalidArgumentException When the passed value is not valid */ abstract public static function fromString(string $uid): static; /** * @throws \InvalidArgumentException When the passed value is not valid */ public static function fromBinary(string $uid): static { if (16 !== \strlen($uid)) { throw new \InvalidArgumentException('Invalid binary uid provided.'); } return static::fromString($uid); } /** * @throws \InvalidArgumentException When the passed value is not valid */ public static function fromBase58(string $uid): static { if (22 !== \strlen($uid)) { throw new \InvalidArgumentException('Invalid base-58 uid provided.'); } return static::fromString($uid); } /** * @throws \InvalidArgumentException When the passed value is not valid */ public static function fromBase32(string $uid): static { if (26 !== \strlen($uid)) { throw new \InvalidArgumentException('Invalid base-32 uid provided.'); } return static::fromString($uid); } /** * @throws \InvalidArgumentException When the passed value is not valid */ public static function fromRfc4122(string $uid): static { if (36 !== \strlen($uid)) { throw new \InvalidArgumentException('Invalid RFC4122 uid provided.'); } return static::fromString($uid); } /** * Returns the identifier as a raw binary string. */ abstract public function toBinary(): string; /** * Returns the identifier as a base58 case sensitive string. * * @example 2AifFTC3zXgZzK5fPrrprL (len=22) */ public function toBase58(): string { return strtr(sprintf('%022s', BinaryUtil::toBase($this->toBinary(), BinaryUtil::BASE58)), '0', '1'); } /** * Returns the identifier as a base32 case insensitive string. * * @see https://tools.ietf.org/html/rfc4648#section-6 * * @example 09EJ0S614A9FXVG9C5537Q9ZE1 (len=26) */ public function toBase32(): string { $uid = bin2hex($this->toBinary()); $uid = sprintf('%02s%04s%04s%04s%04s%04s%04s', base_convert(substr($uid, 0, 2), 16, 32), base_convert(substr($uid, 2, 5), 16, 32), base_convert(substr($uid, 7, 5), 16, 32), base_convert(substr($uid, 12, 5), 16, 32), base_convert(substr($uid, 17, 5), 16, 32), base_convert(substr($uid, 22, 5), 16, 32), base_convert(substr($uid, 27, 5), 16, 32) ); return strtr($uid, 'abcdefghijklmnopqrstuv', 'ABCDEFGHJKMNPQRSTVWXYZ'); } /** * Returns the identifier as a RFC4122 case insensitive string. * * @see https://tools.ietf.org/html/rfc4122#section-3 * * @example 09748193-048a-4bfb-b825-8528cf74fdc1 (len=36) */ public function toRfc4122(): string { // don't use uuid_unparse(), it's slower $uuid = bin2hex($this->toBinary()); $uuid = substr_replace($uuid, '-', 8, 0); $uuid = substr_replace($uuid, '-', 13, 0); $uuid = substr_replace($uuid, '-', 18, 0); return substr_replace($uuid, '-', 23, 0); } /** * Returns the identifier as a prefixed hexadecimal case insensitive string. * * @example 0x09748193048a4bfbb8258528cf74fdc1 (len=34) */ public function toHex(): string { return '0x'.bin2hex($this->toBinary()); } /** * Returns whether the argument is an AbstractUid and contains the same value as the current instance. */ public function equals(mixed $other): bool { if (!$other instanceof self) { return false; } return $this->uid === $other->uid; } public function compare(self $other): int { return (\strlen($this->uid) - \strlen($other->uid)) ?: ($this->uid <=> $other->uid); } public function __toString(): string { return $this->uid; } public function jsonSerialize(): string { return $this->uid; } }