Repo for the search and displace core module including the interface to select files and search and displace operations to run on them.
https://searchanddisplace.com
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.5 KiB
81 lines
1.5 KiB
<?php
|
|
|
|
namespace App\SearchDisplace\Searchers;
|
|
|
|
class Mapper
|
|
{
|
|
protected $mapper;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->mapper = [
|
|
'amount-of-money' => [
|
|
'name' => 'Amount Of Money',
|
|
],
|
|
|
|
'credit-card-number' => [
|
|
'name' => 'Credit Card Number',
|
|
],
|
|
|
|
'distance' => [
|
|
'name' => 'Distance',
|
|
],
|
|
|
|
'duration' => [
|
|
'name' => 'Duration',
|
|
],
|
|
|
|
'email' => [
|
|
'name' => 'Email',
|
|
],
|
|
|
|
'numeral' => [
|
|
'name' => 'Numeral',
|
|
],
|
|
|
|
'ordinal' => [
|
|
'name' => 'Ordinal',
|
|
],
|
|
|
|
'phone-number' => [
|
|
'name' => 'Phone Number',
|
|
],
|
|
|
|
'quantity' => [
|
|
'name' => 'Quantity',
|
|
],
|
|
|
|
'temperature' => [
|
|
'name' => 'Temperature',
|
|
],
|
|
|
|
'time' => [
|
|
'name' => 'Time',
|
|
],
|
|
|
|
'url' => [
|
|
'name' => 'URL',
|
|
],
|
|
|
|
'volume' => [
|
|
'name' => 'Volume',
|
|
],
|
|
];
|
|
}
|
|
|
|
public function getSearchers()
|
|
{
|
|
return array_keys($this->mapper);
|
|
}
|
|
|
|
public function get()
|
|
{
|
|
$items = [];
|
|
|
|
foreach ($this->mapper as $key => $value) {
|
|
$items[$key] = $value['name'];
|
|
}
|
|
|
|
return $items;
|
|
}
|
|
}
|