Documentation

FindReplaceText
in package
implements FindReplaceInterface

A doomtool for plaintext database columns.

This is configurable during the construct. A set of these are registered in sprout core for core tables.

Table of Contents

Interfaces

FindReplaceInterface
This is a base class for find-replace behaviours, aka. the doomtool.

Properties

$column  : string
$table  : string

Methods

__construct()  : mixed
find()  : iterable<string|int, array<string|int, mixed>>
Find all occurrences of the the given string patterns.
getName()  : string
The friendly name for this doomtool shown in the dbtools.
key()  : string
The unique key for this doomtool.
replace()  : int
Find and replace all occurrences of the given string patterns.

Properties

Methods

__construct()

public __construct(string $table, string $column) : mixed
Parameters
$table : string
$column : string
Tags
inheritdoc

find()

Find all occurrences of the the given string patterns.

public find(array<string|int, mixed> $finds, array<string|int, mixed> $settings) : iterable<string|int, array<string|int, mixed>>
Parameters
$finds : array<string|int, mixed>

regex patterns

$settings : array<string|int, mixed>

[ ignore_case ]

Tags
inheritdoc
Return values
iterable<string|int, array<string|int, mixed>> —

[ id, key, text, url, indexes, count ]

getName()

The friendly name for this doomtool shown in the dbtools.

public getName() : string
Tags
inheritdoc
Return values
string

key()

The unique key for this doomtool.

public key() : string
Tags
inheritdoc
Return values
string

replace()

Find and replace all occurrences of the given string patterns.

public replace(array<string|int, mixed> $replaces, array<string|int, mixed> $settings) : int
Parameters
$replaces : array<string|int, mixed>

[ find => replace ] regex + replacements

$settings : array<string|int, mixed>

[ ignore_case ]

Tags
inheritdoc
Return values
int —

number of replacements

On this page

Search results