src/Spiritix/LadaCache/Reflector.php
private function splitTableAndColumn($sqlString)
    {
        // Most column identifiers don't contain a database or table name
        // In this case just return what we've got
        if (strpos($sqlString, '.') === false) {
            return [null, $sqlString];
        }

        $parts = explode('.', $sqlString);

        // If we have three parts, the identifier also contains the database name
        if (count($parts) === 3) {
            $table = $parts[1];
        }
        // Otherwise it contains table and column
        else {
            $table = $parts[0];
        }

        // Column is always the last part
        $column = end($parts);

        return [$table, $column];
    }
private function splitTableAndColumn($sqlString)
    {
        // Most column identifiers don't contain a database or table name
        // In this case just return what we've got
        if (strpos($sqlString, '.') === false) {
            return [null, $sqlString];
        }

        $parts = explode('.', $sqlString);

        // If we have three parts, the identifier also contains the database name
        if (count($parts) === 3) {
            $table = $parts[1];
        }
        // Otherwise it contains table and column
        else {
            $table = $parts[0];
        }

        // Column is always the last part
        $column = end($parts);

        return [$table, $column];
    }
private function splitTableAndColumn ( $ sqlString ) { // Most column identifiers don't contain a database or table name // In this case just return what we've got if ( strpos ( $ sqlString , '.' ) === false ) { return [ null , $ sqlString ] ; } $ parts = explode ( '.' , $ sqlString ) ; // If we have three parts, the identifier also contains the database name if ( count ( $ parts ) === 3 ) { $ table = $ parts [ 1 ] ; } // Otherwise it contains table and column else { $ table = $ parts [ 0 ] ; } // Column is always the last part $ column = end ( $ parts ) ; return [ $ table , $ column ] ; }
Splits an SQL column identifier into table and column.

@param string $sqlString SQL column identifier

@return array [table|null, column]
Splits an SQL column identifier into table and column .