src/Schema.php
/**
     * Resolves the table name and schema name (if any).
     *
     * @param TableSchema $table the table metadata object.
     * @param string $name the table name
     */
Resolves the table name and schema name (if any).
@param TableSchema $table the table metadata object.
@param string $name the table name
Resolves the table name and schema name ( if any ) . @param TableSchema $table the table metadata object . @param string $name the table name
protected function resolveTableNames(TableSchema $table, string $name): void
    {
        $parts = $this->getTableNameParts($name);
        $partCount = count($parts);
        if ($partCount === 4) {
            $table->catalogName($parts[1]);
            $table->schemaName($parts[2]);
            $table->name($parts[3]);
            $table->fullName($table->getCatalogName() . '.' . $table->getSchemaName() . '.' . $table->getName());
        } elseif ($partCount === 3) {
            $table->catalogName($parts[0]);
            $table->schemaName($parts[1]);
            $table->name($parts[2]);
            $table->fullName($table->getCatalogName() . '.' . $table->getSchemaName() . '.' . $table->getName());
        } elseif ($partCount === 2) {
            $table->schemaName($parts[0]);
            $table->name($parts[1]);
            $table->fullName(
                $table->getSchemaName() !== $this->defaultSchema
                ? $table->getSchemaName() . '.' . $table->getName() : $table->getName()
            );
        } else {
            $table->schemaName($this->defaultSchema);
            $table->name($parts[0]);
            $table->fullName($table->getName());
        }
    }
protected function resolveTableNames ( TableSchema $ table , string $ name ) : void { $ parts = $ this -> getTableNameParts ( $ name ) ; $ partCount = count ( $ parts ) ; if ( $ partCount === 4 ) { $ table -> catalogName ( $ parts [ 1 ] ) ; $ table -> schemaName ( $ parts [ 2 ] ) ; $ table -> name ( $ parts [ 3 ] ) ; $ table -> fullName ( $ table -> getCatalogName ( ) . '.' . $ table -> getSchemaName ( ) . '.' . $ table -> getName ( ) ) ; } elseif ( $ partCount === 3 ) { $ table -> catalogName ( $ parts [ 0 ] ) ; $ table -> schemaName ( $ parts [ 1 ] ) ; $ table -> name ( $ parts [ 2 ] ) ; $ table -> fullName ( $ table -> getCatalogName ( ) . '.' . $ table -> getSchemaName ( ) . '.' . $ table -> getName ( ) ) ; } elseif ( $ partCount === 2 ) { $ table -> schemaName ( $ parts [ 0 ] ) ; $ table -> name ( $ parts [ 1 ] ) ; $ table -> fullName ( $ table -> getSchemaName ( ) !== $ this -> defaultSchema ? $ table -> getSchemaName ( ) . '.' . $ table -> getName ( ) : $ table -> getName ( ) ) ; } else { $ table -> schemaName ( $ this -> defaultSchema ) ; $ table -> name ( $ parts [ 0 ] ) ; $ table -> fullName ( $ table -> getName ( ) ) ; } }
Resolves the table name and schema name (if any).
Resolves the table name and schema name ( if any ) .
/** server name, catalog name, schema name and table name passed */ /** catalog name, schema name and table name passed */ /** only schema name and table name passed */ /** only table name passed */