protected function __installData($basePrefix = '', $sample = false) { if (isset($this->fixtures)) { $Model = new Model(false, false, $this->connection); foreach ($this->fixtures as $type => $fixtures) { if ($type != 'sample' || $type == 'sample' && $sample == true) { foreach ($fixtures as $model => $data) { if (is_array($data) && !empty($data)) { $tableName = $this->__getTableName($model); $Model->tablePrefix = $this->__getTablePrefix($tableName, $basePrefix); $Model->setSource($tableName); $Model->saveAll($data, array('validate' => false)); } } } } } }