Debian Codegraph @

vendor/ipl/orm/src/UnionModel.php

raw
1 <?php
2
3 namespace ipl\Orm;
4
5 use ipl\Sql\Connection;
6
7 abstract class UnionModel extends Model
8 {
9 /**
10 * Get a UNION query which is tied to this model and the given database connection
11 *
12 * @param Connection $db
13 *
14 * @return UnionQuery
15 */
16 public static function on(Connection $db)
17 {
18 return (new UnionQuery())
19 ->setDb($db)
20 ->setModel(new static());
21 }
22
23 /**
24 * Get the UNION models and columns
25 *
26 * @return array
27 */
28 abstract public function getUnions();
29 }