Documentation

FindReplace
in package

The tool of doom.

Perform find-replace actions across the whole database.

Table of Contents

Constants

NAMESPACE  : mixed = '691bf093-26a4-4d30-8a63-f7d0d94b700d'
A namespace for mushing keys.

Properties

$replacers  : array<string|int, FindReplaceInterface>
Registered find/replace targets.

Methods

findIndexes()  : array<string|int, array<string|int, mixed>>
Find indexes for a set of patterns.
getReplacer()  : null|FindReplaceInterface
Find a doomtool by it's key.
getReplacers()  : array<string|int, FindReplaceInterface>
Get all doomtools.
getSample()  : string
Create a sample highlight using indexes.
register()  : void
Register a doomtool instance.

Constants

NAMESPACE

A namespace for mushing keys.

public mixed NAMESPACE = '691bf093-26a4-4d30-8a63-f7d0d94b700d'

Wrap your keys in UUIDv5 with this to make it smaller but also URL safe.

Properties

Methods

findIndexes()

Find indexes for a set of patterns.

public static findIndexes(string $text, array<string|int, mixed> $finds[, bool $ignore_case = true ]) : array<string|int, array<string|int, mixed>>
Parameters
$text : string
$finds : array<string|int, mixed>
$ignore_case : bool = true
Return values
array<string|int, array<string|int, mixed>> —

[ start, length ]

getReplacers()

Get all doomtools.

public static getReplacers([array<string|int, string>|null $keys = null ]) : array<string|int, FindReplaceInterface>

Or provide a set of keys.

Parameters
$keys : array<string|int, string>|null = null
Return values
array<string|int, FindReplaceInterface>

getSample()

Create a sample highlight using indexes.

public static getSample(string $text, array<string|int, mixed> $index[, int $padding = 20 ]) : string

Indexes can be sourced from the replacer find() results.

Parameters
$text : string
$index : array<string|int, mixed>

[ start, length ]

$padding : int = 20
Tags
see
FindReplaceInterface::find()
findIndexes()
Return values
string —

HTML-safe snippet

On this page

Search results