Sleimanx2\Plastic\Mappings\Mapper::runMappingList PHP Method

runMappingList() public method

Run an array of mappings.
public runMappingList ( array $mappings, array $options = [] )
$mappings array
$options array
    public function runMappingList(array $mappings, array $options = [])
    {
        // First we will just make sure that there are any migrations to run. If there
        // aren't, we will just make a note of it to the developer.
        if (count($mappings) == 0) {
            $this->note('<info>Nothing to map</info>');
            return;
        }
        $batch = $this->repository->getNextBatchNumber();
        $step = Arr::get($options, 'step', false);
        foreach ($mappings as $file) {
            $this->runMap($file, $batch);
            if ($step) {
                $batch++;
            }
        }
    }