Recursive compare of $data with $matchArray.

@param array $data Given data
@param array $matchArray Part to mach against
@return bool
493451
protected function checkMatchArray(array $data, array $matchArray): bool
    {
        $result = true;
        foreach ($matchArray as $name => $value) {
            if (isset($data[$name])) {
                if (is_array($value)) {
                    $result = $this->checkMatchArray($data[$name], $value);
                    if ($result === false) {
                        return false;
                    }
                } elseif ($data[$name] === $value) {
                    $result = (bool)($result & true);
                } else {
                    return false;
                }
            } else {
                return false;
            }
        }
        return $result;
    }
669370
public static function has(array $data, $key)
	{
		if (!is_array($data)) {
			return false;
		}

		if (!array_key_exists($key,$data)) {
			return false;
		}

		return true;
	}
118830
public function filter(array $data)
    {
        $filtered = [];

        foreach ($data as $row) {
            if ($this->passesFilter($row)) {
                $filtered[] = $row;
            }
        }

        return $filtered;
    }
354630
public function setFormData(array $data)
    {
        $objData = $this->objData();
        $merged = array_replace_recursive($objData, $data);

        // Remove null values
        $merged = array_filter($merged, function ($val) {
            if ($val === null) {
                return false;
            }

            return true;
        });

        $this->formData = $merged;
        $this->obj()->setData($merged);

        return $this;
    }
342231
public function update(array $data)
    {
        if ( $this->validator->with($data)->validForUpdate() )
        {
            $data['permissions'] = explode(',', $data['permissions']);
            $this->permission->update($data);
            return true;
        }
        else
        {
            return false;
        }
    }
1155646
public function match($matchUrl = null)
    {
        if (null !== $matchUrl) {
            $this->setMatchUrl($matchUrl);
        }

        if ($this->isUrlEqual()) {
            return true;
        } else {
            return false;
        }

    }
1201855
public function match($data)
    {
        if ($data instanceof ModuleInterface) {
            $data = $data->getOptions();
        }

        $position = isset($data['position']) ? $data['position'] : $data;

        return in_array($position, (array)$this->getValue());
    }
452461
public function matches($data, Expression $expression)
    {
        $matcher = $this->compile($expression);
        return $matcher($data);
    }
715213
public function set($name, array $data = [])
    {
        $this->setName($name);
        $this->setData($data);

        return $this->isValid();
    }
1203002
public function match($data)
    {
        if (is_object($data)) {
            $data = get_class($data);
        }

        return in_array($data, (array)$this->getValue());
    }
1176143
public function validate(array $data)
    {
        try {
            $messages = $this->validateArray($data, $this->nested);

        } catch (\RuntimeException $e) {
            throw (new ValidationException($e->getMessage(), $e->getCode(), $e))->setMessages();
        }

        if (!empty($messages)) {
            throw (new ValidationException())->setMessages($messages);
        }
    }
840098
protected function replaceWithData($text, array $matches, array $data)
    {
        list($search, $replace) = $this->getSearchAndReplace($matches, $data);

        return str_replace($search, $replace, $text);
    }
54655
protected function parseArrayOfPrimaryData(array $data)
    {
        $isValid = true;
        $result  = null;
        foreach ($data as $primaryData) {
            $parsed = $this->parseSinglePrimaryData($primaryData);
            if ($parsed === null) {
                $isValid = false;
            } else {
                $result[] = $parsed;
            }
        }

        return $isValid === true ? $result : null;
    }
317498
protected function prepareData(&$data)
    {
        // Remove MatchOn Filter:
        
        $name = $this->getMatchOnName();
        
        if (isset($data[$name])) {
            unset($data[$name]);
        }
    }
941528
public function getIsAllValuesValid(array $data)
    {
        foreach($data as $value)
        {
            if(!$this->getIsValidValue($value))
            {
                return false;
            }
        }
        return true;
    }
992886
protected final function validateUpdateData(array $data = null) {
		if ($data === null && isset($this->_formData)) {
			$data = $this->_formData;
		}
		if ($this->rules) {
			$newRules = [];
			foreach ($data as $key => $v) {
				if (isset($this->rules[ $key ])) {
					$newRules[ $key ] = $this->rules[ $key ];
				}
			}
			if ($newRules) {
				return $this->validateData($newRules, $data);
			}
		}

		return true;
	}
1170628
public function matchObjects(DataList $objects, $data)
    {
        // Detect Filter:
        
        $name = $this->getMatchOnName();
        
        if (isset($data[$name])) {
            
            $filter  = [];
            $matchOn = $data[$name];
            
            if (is_array($matchOn)) {
                
                // Handle Array Filter:
                
                if (ArrayLib::is_associative($matchOn)) {
                    
                    $filter = $matchOn;
                    
                } else {
                    
                    foreach ($matchOn as $field) {
                        
                        if (isset($data[$field])) {
                            $filter[$field] = $data[$field];
                        }
                        
                    }
                    
                }
                
            } elseif (isset($data[$matchOn])) {
                
                // Handle String Filter:
                
                $filter[$matchOn] = $data[$matchOn];
                
            }
            
            foreach ($filter as $k => $v) {
                $filter[$k] = $this->processValue($v);
            }
            
            return $objects->filter($filter);
            
        }
        
        return $objects;
    }