Server IP : 192.250.235.76 / Your IP : 45.90.210.12
System : Linux s2968.sgp1.stableserver.net 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
PHP Version : 8.2.29
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
1902120114081995
Server IP : 198.54.116.172 / Your IP : 216.73.216.36
System : Linux server322.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : mail
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Upload Files :
Command :
Current File : /home/sadasgfe/fashiondebate.pk/wp-content/plugins/elementor-pro/core/utils//collection.php
<?php
namespace ElementorPro\Core\Utils;
use \Elementor\Core\Utils\Collection as Collection_Base;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// TODO: Move to Core.
class Collection extends Collection_Base implements \JsonSerializable {
/**
* Change the items key by an item field.
*
* @param string $key
*
* @return Collection
*/
public function key_by( $key ) {
return $this->map_with_keys( function ( $item ) use ( $key ) {
return [ $item->{$key} => $item ];
} );
}
/**
* Flatten the items recursively.
*
* @return array
*/
public function flatten_recursive() {
$output = [];
$items = $this->all();
array_walk_recursive($items, function( $item ) use ( &$output ) {
$output[] = $item;
} );
return $output;
}
/**
* Run array_diff between the collection and other array or collection.
*
* @param $filter
*
* @return $this
*/
public function diff( $filter ) {
if ( $filter instanceof Collection_Base ) {
$filter = $filter->all();
}
return new static( array_diff( $this->all(), $filter ) );
}
/**
* Reverse the array
*
* @param false $preserve_keys
*
* @return $this
*/
public function reverse( $preserve_keys = false ) {
return new static(
array_reverse( $this->all(), $preserve_keys )
);
}
/**
* Return a JSON serialized representation of the Collection.
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize() {
return $this->all();
}
}
Name
Size
Last Modified
Owner / Group
Permissions
Options
.. -- March 23 2025 22:40:18 sadasgfe / sadasgfe 0755 abtest.php 0.978 KB March 23 2025 22:40:18 sadasgfe / sadasgfe 0644 collection.php 1.469 KB March 23 2025 22:40:18 sadasgfe / sadasgfe 0644 hints.php 1.909 KB March 23 2025 22:40:18 sadasgfe / sadasgfe 0644 registrar.php 1.14 KB March 23 2025 22:40:18 sadasgfe / sadasgfe 0644