Final Class Yiisoft\Data\Cycle\Reader\FilterHandler\LikeHandler\LikeHandlerFactory
| Inheritance | Yiisoft\Data\Cycle\Reader\FilterHandler\LikeHandler\LikeHandlerFactory |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getLikeHandler() | Yiisoft\Data\Cycle\Reader\FilterHandler\LikeHandler\LikeHandlerFactory |
Method Details
| 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
}
Signup or Login in order to comment.