private function insertData($callback = null): void
    {
        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['pre_actions']
        );

        for ($rowNum = 1; $rowNum <= $this->limit; $rowNum++) {
            // Call the right method according to the mode
            $this->{$this->insertMode[$this->mode]}($rowNum);

            if (!is_null($callback)) {
                $callback($rowNum);
            }
        }

        // Run a final method if defined
        if ($this->mode === 'batch') {
            $this->loadDataInBatch('insert');
        }

        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['post_actions']
        );
    }
private function insertData($callback = null): void
    {
        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['pre_actions']
        );

        for ($rowNum = 1; $rowNum <= $this->limit; $rowNum++) {
            // Call the right method according to the mode
            $this->{$this->insertMode[$this->mode]}($rowNum);

            if (!is_null($callback)) {
                $callback($rowNum);
            }
        }

        // Run a final method if defined
        if ($this->mode === 'batch') {
            $this->loadDataInBatch('insert');
        }

        $this->expression->evaluateExpressions(
            $this->configEntities[$this->entity]['post_actions']
        );
    }
private function insertData ( $ callback = null ) : void { $ this -> expression -> evaluateExpressions ( $ this -> configEntities [ $ this -> entity ] [ 'pre_actions' ] ) ; for ( $ rowNum = 1 ; $ rowNum <= $ this -> limit ; $ rowNum ++ ) { // Call the right method according to the mode $ this -> { $ this -> insertMode [ $ this -> mode ] } ( $ rowNum ) ; if ( ! is_null ( $ callback ) ) { $ callback ( $ rowNum ) ; } } // Run a final method if defined if ( $ this -> mode === 'batch' ) { $ this -> loadDataInBatch ( 'insert' ) ; } $ this -> expression -> evaluateExpressions ( $ this -> configEntities [ $ this -> entity ] [ 'post_actions' ] ) ; }
Insert data into table

@param  callable $callback
Insert data into table