Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MigrationData.php
Go to the documentation of this file.
1 <?php
7 
14 {
20  protected $_requiredParams = ['plain', 'wiki', 'xml', 'serialized'];
21 
27  protected $_patterns = [];
28 
33  public function __construct(
34  array $data
35  ) {
36  foreach ($this->_requiredParams as $param) {
37  if (!isset($data[$param])) {
38  throw new \InvalidArgumentException("Missing required param " . $param);
39  }
40  $this->_patterns[$param] = $data[$param];
41  }
42  }
43 
49  public function getPlainFindPattern()
50  {
51  return $this->_patterns['plain'];
52  }
53 
59  public function getWikiFindPattern()
60  {
61  return $this->_patterns['wiki'];
62  }
63 
69  public function getXmlFindPattern()
70  {
71  return $this->_patterns['xml'];
72  }
73 
79  public function getSerializedFindPattern()
80  {
81  return $this->_patterns['serialized'];
82  }
83 }