public function fromPreviousTable(string $tableName) : GroupedTableDefiner
    {
        if (!isset($this->previousTables[$tableName])) {
            throw InvalidArgumentException::format(
                'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues(array_keys($this->previousTables)), $tableName
            );
        }

        return new GroupedTableDefiner($this->name, $this->callback, $this->previousTables[$tableName]->getDataSource());
    }
public function fromPreviousTable(string $tableName) : GroupedTableDefiner
    {
        if (!isset($this->previousTables[$tableName])) {
            throw InvalidArgumentException::format(
                'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues(array_keys($this->previousTables)), $tableName
            );
        }

        return new GroupedTableDefiner($this->name, $this->callback, $this->previousTables[$tableName]->getDataSource());
    }
public function fromPreviousTable ( string $ tableName ) : GroupedTableDefiner { if ( ! isset ( $ this -> previousTables [ $ tableName ] ) ) { throw InvalidArgumentException :: format ( 'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given' , __METHOD__ , Debug :: formatValues ( array_keys ( $ this -> previousTables ) ) , $ tableName ) ; } return new GroupedTableDefiner ( $ this -> name , $ this -> callback , $ this -> previousTables [ $ tableName ] -> getDataSource ( ) ) ; }
Sets the data source as a previous table.

@param string $tableName

@return GroupedTableDefiner
@throws InvalidArgumentException
Sets the data source as a previous table .