Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Matches.php

function Matches::merge

Merges the current object with the other given Matches objects

Parameters

Matches[] $matchesArr Array of Matches to merge:

Return value

$this

File

vendor/mck89/peast/lib/Peast/Selector/Matches.php, line 119

Class

Matches
Selector matches class

Namespace

Peast\Selector

Code

public function merge($matchesArr) {
    foreach ($matchesArr as $matches) {
        foreach ($matches->getMatches() as $match) {
            $this->addMatch($match[0], $match[1]);
        }
    }
    return $this->unique();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal