1 | <?php namespace Arcanedev\LaravelMetrics\Expressions; |
||
12 | class Factory |
||
13 | { |
||
14 | /* ----------------------------------------------------------------- |
||
15 | | Properties |
||
16 | | ----------------------------------------------------------------- |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * The registered expressions. |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | protected static $expressions = [ |
||
25 | 'if_null' => [ |
||
26 | 'mariadb' => IfNull\MySqlExpression::class, |
||
27 | 'mysql' => IfNull\MySqlExpression::class, |
||
28 | 'pgsql' => IfNull\PostgresExpression::class, |
||
29 | 'sqlite' => IfNull\SqliteExpression::class, |
||
30 | ], |
||
31 | ]; |
||
32 | |||
33 | /* ----------------------------------------------------------------- |
||
34 | | Properties |
||
35 | | ----------------------------------------------------------------- |
||
36 | */ |
||
37 | |||
38 | /** |
||
39 | * Make an expression. |
||
40 | * |
||
41 | * @param string $driver |
||
42 | * @param string $name |
||
43 | * @param mixed $value |
||
44 | * @param array $params |
||
45 | * |
||
46 | * @return \Arcanedev\LaravelMetrics\Expressions\Expression|mixed |
||
47 | */ |
||
48 | 4 | public static function make(string $driver, string $name, $value, array $params = []): Expression |
|
57 | } |
||
58 |