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

Breadcrumb

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

function Matches::get

Returns the match at the given index

Parameters

int $index Index:

Return value

array

Throws

\Exception

File

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

Class

Matches
Selector matches class

Namespace

Peast\Selector

Code

public function get($index) {
    $index = (int) $index;
    if (!isset($this->matches[$index])) {
        throw new \Exception("Invalid index {$index}");
    }
    return $this->matches[$index];
}
RSS feed
Powered by Drupal