src/Labi/Database/Utility/Column.php
public static function convColumnId($id, $table)
    {
        if (!is_string($id)) {
            throw new \Exception("Column id should be string.");
        }

        $exploded = explode('.', $id);
        $count = count($exploded);

        if ($count === 1) {
            $std = new \stdClass();

            $std->table = $table;
            $std->name = $id;
            $std->id = "{$table}.{$id}";

            return $std;
        }elseif($count === 2){
            $std = new \stdClass();

            $std->table = $exploded[0];
            $std->name = $exploded[1];
            $std->id = $id;

            return $std;
        }else{
            throw new \Exception("Incorrect column name $id.");

        }
    }
public static function convColumnId($id, $table)
    {
        if (!is_string($id)) {
            throw new \Exception("Column id should be string.");
        }

        $exploded = explode('.', $id);
        $count = count($exploded);

        if ($count === 1) {
            $std = new \stdClass();

            $std->table = $table;
            $std->name = $id;
            $std->id = "{$table}.{$id}";

            return $std;
        }elseif($count === 2){
            $std = new \stdClass();

            $std->table = $exploded[0];
            $std->name = $exploded[1];
            $std->id = $id;

            return $std;
        }else{
            throw new \Exception("Incorrect column name $id.");

        }
    }
- magic