-<?php namespace BookStack\Entities\Tools;
+<?php
+
+namespace BookStack\Entities\Tools;
use Illuminate\Http\Request;
class SearchOptions
{
-
/**
* @var array
*/
foreach ($decoded as $type => $value) {
$instance->$type = $value;
}
+
return $instance;
}
if (isset($inputs['types']) && count($inputs['types']) < 4) {
$instance->filters['type'] = implode('|', $inputs['types']);
}
+
return $instance;
}
{
$terms = [
'searches' => [],
- 'exacts' => [],
- 'tags' => [],
- 'filters' => []
+ 'exacts' => [],
+ 'tags' => [],
+ 'filters' => [],
];
$patterns = [
- 'exacts' => '/"(.*?)"/',
- 'tags' => '/\[(.*?)\]/',
- 'filters' => '/\{(.*?)\}/'
+ 'exacts' => '/"(.*?)"/',
+ 'tags' => '/\[(.*?)\]/',
+ 'filters' => '/\{(.*?)\}/',
];
// Parse special terms
return $string;
}
-
-}
\ No newline at end of file
+}