Filter by UUID.

@return void

@SuppressWarnings(PHPMD.UnusedLocalVariable)
@SuppressWarnings(PHPMD.CyclomaticComplexity)
550119
public static function filterByUuid($filter)
    {
        $operator = Arr::get($filter, 'operator');
        $method = Arr::get($filter, 'method');
        $arguments = Arr::get($filter, 'arguments');
        $value_one = Arr::get($filter, 'value_one');
        $value_two = Arr::get($filter, 'value_two');
        $settings = Arr::get($filter, 'settings');
        $positive = Arr::get($filter, 'positive');

        switch ($operator) {
            case 'IN':
                $method = 'whereIn';
                $arguments = [static::getListFromString($value_one)];
                break;
            case 'NOT_IN':
                $method = 'whereNotIn';
                $arguments = [static::getListFromString($value_one)];
                break;
            case 'NULL':
                $method = 'whereNull';
                break;
            case 'NOT_NULL':
                $method = 'whereNotNull';
                break;
        }

        return [
            'operator'  => $operator,
            'method'    => $method,
            'arguments' => $arguments,
            'value_one' => $value_one,
            'value_two' => $value_two,
            'settings'  => $settings,
            'positive'  => $positive,
        ];
    }
589755
public function getUuid()
    {
        /** @var Uuid $constraint */
        if ($constraint = $this->docBlockUtility->getConstraint($this->property, Uuid::class)) {
            return ($constraint->strict) ? self::UUID_CONSTRAINT_STRICT_VALUE : self::UUID_CONSTRAINT_NON_STRICT_VALUE;
        }
    }
96403
@Override
	public void removeByUuid(String uuid) {
		for (CommerceAvailabilityEstimate commerceAvailabilityEstimate : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceAvailabilityEstimate);
		}
	}
1226815
public function getUuids()
    {
        $uuids = array();

        foreach ($this->map as $bindingDescriptor) {
            $uuids[] = $bindingDescriptor->getUuid();
        }

        return $uuids;
    }
454143
public function getUid()
    {
        if (is_null($this->uid)) {
            $pathName = (! empty($this->getFileInfo()->getRelativePathname())) ? $this->getFileInfo()->getRelativePathname() : $this->getFileInfo()->getPathname();
            $this->uid = $this->cleanUid($pathName);
        }

        return $this->uid;
    }
285712
@Override
	public void removeByUuid(String uuid) {
		for (CommerceVirtualOrderItem commerceVirtualOrderItem : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceVirtualOrderItem);
		}
	}
1219620
private function checkVisitorUuid()
    {
        if ( ! isset($this->visitorInfo['uuid']) || ! $this->visitorInfo['uuid'])
            $this->visitorInfo['uuid'] = $this->getVisitorIdFromSystem();
    }
280891
def is_uuid(u):
    """"""
    if isinstance(u, str) and u.replace('-', '') == uuid.UUID(u).hex:
        return u
    return False
886745
@Override
	public void removeByUuid(String uuid) {
		for (CommerceWishList commerceWishList : findByUuid(uuid,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commerceWishList);
		}
	}
148025
private function uuid(): string
    {
        return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
            mt_rand(0, 0xffff), mt_rand(0, 0xffff),
            mt_rand(0, 0xffff),
            mt_rand(0, 0x0fff) | 0x4000,
            mt_rand(0, 0x3fff) | 0x8000,
            mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
        );
    }
1108073
public static function toOptimized($uuid)
    {
        $uuid = preg_replace('/\-/', null, $uuid);
        return hex2bin(substr($uuid, 12, 4)) .
            hex2bin(substr($uuid, 8, 4)) .
            hex2bin(substr($uuid, 0, 8)) .
            hex2bin(substr($uuid, 16, 4)) .
            hex2bin(substr($uuid, 20));
    }
14993
public static function uuid() {
		$uuid = static::random(16);
		$uuid[6] = chr(ord($uuid[6]) & static::UUID_CLEAR_VER | static::UUID_VERSION_4);
		$uuid[8] = chr(ord($uuid[8]) & static::UUID_CLEAR_VAR | static::UUID_VAR_RFC);

		return join('-', array(
			bin2hex(substr($uuid, 0, 4)),
			bin2hex(substr($uuid, 4, 2)),
			bin2hex(substr($uuid, 6, 2)),
			bin2hex(substr($uuid, 8, 2)),
			bin2hex(substr($uuid, 10, 6))
		));
	}
893424
public static function createByUUIDs(array $uuids): self
    {
        $ids = array_map(function (ItemUUID $uuid) {
            return $uuid->composeUUID();
        }, $uuids);

        $query = self::create('', self::DEFAULT_PAGE, count($uuids))
            ->disableAggregations()
            ->disableSuggestions();

        $query->filters['_id'] = Filter::create(
            '_id',
            array_unique($ids),
            Filter::AT_LEAST_ONE,
            Filter::TYPE_FIELD
        );

        return $query;
    }
677938
protected function validateUUID($uuid)
    {
        /* @var $validator UniqueValidator */
        /* @var $model BaseActiveRecord */
        $validator = Yii::createObject(array_merge([
            'class' => UniqueValidator::class,
        ], $this->uniqueValidator));

        $model = clone $this->owner;
        $model->clearErrors();
        $model->{$this->attribute} = $uuid;

        $validator->validateAttribute($model, $this->attribute);
        return !$model->hasErrors();
    }
1186551
public function filterRecords()
    {
        if ($this->autoFilter && $this->request->isSearchable()) {
            $this->filtering();
        } else {
            if (is_callable($this->filterCallback)) {
                call_user_func($this->filterCallback, $this->filterCallbackParameters);
            }
        }


        $this->columnSearch();
        $this->filteredRecords = $this->isFilterApplied ? $this->count() : $this->totalRecords;
    }
901098
public function searchByUid($uid) {
		$results = $this->ldap->search($this->basedn,
			$this->search_username . '=' . $uid);
		return $results;
	}
680425
static public function uuid($value, $message = null, $propertyPath = null)
        {
            $value = str_replace(
                array(
                    'urn:',
                    'uuid:',
                    '{', '}'
                ),
                '',
                $value
            );

            if ($value === '00000000-0000-0000-0000-000000000000') {
                return;
            }

            if (!preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-5][0-9A-Fa-f]{3}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
                $message = $message ?: sprintf(
                    'Value "%s" is not a valid UUID.',
                    static::stringify($value)
                );

                throw static::createException($value, $message, static::INVALID_UUID, $propertyPath);
            }
        }