Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Firstname.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Fixture\DataSource;
9 
13 class Firstname extends DataSource
14 {
18  public function __construct($data = '')
19  {
20  $this->data = $data;
21  }
22 
29  public function getData($key = null)
30  {
31  $this->data = str_replace('%signifyd_isolation%', $this->generateIsolation(), $this->data);
32 
33  return parent::getData($key);
34  }
35 
42  private function generateIsolation($length = 10)
43  {
44  return substr(str_shuffle(str_repeat("abcdefghijklmnopqrstuvwxyz", $length)), 0, $length);
45  }
46 }