| @@ 19-37 (lines=19) @@ | ||
| 16 | ||
| 17 | protected $occurrences = array(); |
|
| 18 | ||
| 19 | protected function configure() |
|
| 20 | { |
|
| 21 | parent::configure(); |
|
| 22 | ||
| 23 | $description = ''; |
|
| 24 | $description .= 'Search string in database (even in serialized objects). ' . PHP_EOL; |
|
| 25 | $description .= ' '; |
|
| 26 | ||
| 27 | $this |
|
| 28 | ->setName('db:occurrences') |
|
| 29 | ->setDescription($description) |
|
| 30 | ->addArgument( |
|
| 31 | static::ARGUMENT_SEARCH, |
|
| 32 | InputArgument::OPTIONAL, |
|
| 33 | 'What to search for ? if not specified, the search items are taken from |
|
| 34 | config file like for db:replace command. If multiple items, separate them by |', |
|
| 35 | null |
|
| 36 | ); |
|
| 37 | } |
|
| 38 | ||
| 39 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 40 | { |
|
| @@ 17-35 (lines=19) @@ | ||
| 14 | ||
| 15 | protected $useTransactions = false; |
|
| 16 | ||
| 17 | protected function configure() |
|
| 18 | { |
|
| 19 | parent::configure(); |
|
| 20 | ||
| 21 | $description = ''; |
|
| 22 | $description .= 'Search and replace string in database (even in serialized objects). ' . PHP_EOL; |
|
| 23 | $description .= 'Can be used to switch domain for a WordPress application, when moving to different environement. ' . PHP_EOL; |
|
| 24 | $description .= ' '; |
|
| 25 | ||
| 26 | $this |
|
| 27 | ->setName('db:replace') |
|
| 28 | ->setDescription($description) |
|
| 29 | ->addOption( |
|
| 30 | static::OPTION_USE_TRANSACTIONS, |
|
| 31 | null, |
|
| 32 | InputOption::VALUE_NONE, |
|
| 33 | 'If specified, SQL update operations will be grouped into transactions.' |
|
| 34 | ); |
|
| 35 | } |
|
| 36 | ||
| 37 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 38 | { |
|