Automattic\WooCommerce\Vendor\Pelago\Emogrifier\Utilities
ArrayIntersector::intersectWith
Computes the intersection of $array and the array with which this object was constructed.
Method of the class: ArrayIntersector{}
No Hooks.
Returns
Array$array whose values exist in the array with which this object was constructed. Note that keys are preserved, order is maintained, but duplicates are removed.
Usage
$ArrayIntersector = new ArrayIntersector(); $ArrayIntersector->intersectWith( $array ): array;
- $array(array) (required)
- .
ArrayIntersector::intersectWith() ArrayIntersector::intersectWith code WC 10.7.0
public function intersectWith(array $array): array
{
$invertedArray = \array_flip($array);
$invertedIntersection = \array_intersect_key($invertedArray, $this->invertedArray);
return \array_flip($invertedIntersection);
}