0 follower

Final Class Yiisoft\Data\Cycle\Reader\FilterHandler\LikeHandler\LikeHandlerFactory

InheritanceYiisoft\Data\Cycle\Reader\FilterHandler\LikeHandler\LikeHandlerFactory

Method Details

Hide inherited methods

getLikeHandler() public static method

public static Yiisoft\Data\Cycle\Reader\QueryBuilderFilterHandler getLikeHandler ( string $driverType )
$driverType string

                public static function getLikeHandler(string $driverType): QueryBuilderFilterHandler
{
    // default - ignored due to the complexity of testing and preventing splitting of databaseDriver argument.
    // @codeCoverageIgnoreStart
    return match ($driverType) {
        'SQLite' => new SqliteLikeHandler(),
        'MySQL' => new MysqlLikeHandler(),
        'Postgres' => new PostgresLikeHandler(),
        'SQLServer' => new SqlServerLikeHandler(),
        default => throw new RuntimeException("$driverType database driver is not supported."),
    };
    // @codeCoverageIgnoreEnd
}