DBDiff\DB\DBManager::testResource PHP Метод

testResource() публичный Метод

public testResource ( $input, $res )
    public function testResource($input, $res)
    {
        try {
            $this->capsule->getConnection($res);
        } catch (\Exception $e) {
            throw new DBException("Can't connect to target database");
        }
        if (!empty($input['table'])) {
            try {
                $this->capsule->getConnection($res)->table($input['table'])->first();
            } catch (\Exception $e) {
                throw new DBException("Can't access target table");
            }
        }
    }