Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.188.171.53
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
vendor /
jms /
serializer /
src /
Ordering /
Delete
Unzip
Name
Size
Permission
Date
Action
AlphabeticalPropertyOrderingStrategy.php
531
B
-rw-rw-r--
2022-08-24 15:26
CustomPropertyOrderingStrategy.php
1.12
KB
-rw-rw-r--
2022-08-24 15:26
IdenticalPropertyOrderingStrategy.php
285
B
-rw-rw-r--
2022-08-24 15:26
PropertyOrderingInterface.php
345
B
-rw-rw-r--
2022-08-24 15:26
Save
Rename
<?php declare(strict_types=1); namespace JMS\Serializer\Ordering; final class CustomPropertyOrderingStrategy implements PropertyOrderingInterface { /** @var int[] property => weight */ private $ordering; /** * @param int[] $ordering property => weight */ public function __construct(array $ordering) { $this->ordering = $ordering; } /** * {@inheritdoc} */ public function order(array $properties): array { $currentSorting = $properties ? array_combine(array_keys($properties), range(1, \count($properties))) : []; uksort($properties, function ($a, $b) use ($currentSorting) { $existsA = isset($this->ordering[$a]); $existsB = isset($this->ordering[$b]); if (!$existsA && !$existsB) { return $currentSorting[$a] - $currentSorting[$b]; } if (!$existsA) { return 1; } if (!$existsB) { return -1; } return $this->ordering[$a] < $this->ordering[$b] ? -1 : 1; }); return $properties; } }