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.

28 lines
526 B

  1. <?php
  2. namespace App\SearchDisplace\Regex;
  3. use App\SearchDisplace\Searchers\SearcherCreator;
  4. class RegexFactory extends SearcherCreator
  5. {
  6. protected $expression;
  7. public function __construct($name, $expression, $tag = '')
  8. {
  9. parent::__construct($name, $tag, '');
  10. $this->expression = $expression;
  11. }
  12. public function create()
  13. {
  14. $this->rows = [
  15. [
  16. [ 'expression' => $this->expression, ]
  17. ],
  18. ];
  19. return $this->store();
  20. }
  21. }