Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelSingleCollection.php
More file actions
Latest commit
57 lines (48 loc) · 1.15 KB
/
Copy pathModelSingleCollection.php
File metadata and controls
57 lines (48 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
namespaceColibri\Database;
useColibri\Database;
/**
* ObjectSingleCollection.
*/
class ModelSingleCollection extends ModelCollection
{
/**
* @return \Colibri\Database\Query
*/
protectedfunctionquery(): Query
{
return Query::select();
}
/**
* @return Query
*/
protectedfunctionselFromDbAllQuery(): Query
{
$query = $this->getQuery()->from(static::$itemClass::getTableName());
if ($this->FKValue[1] !== null) {
$query->where([$this->FKName[1] => $this->FKValue[1]]);
}
if ($this->FKValue[0] !== null) {
$query->where([$this->FKName[0] => $this->FKValue[0]]);
}
return$query;
}
// with DataBase
///////////////////////////////////////////////////////////////////////////
/**
* @param \Colibri\Database\Model $id
*/
protectedfunctionaddToDb(Database\Model &$id)
{
}
/**
* @param mixed $id
*/
protectedfunctiondelFromDb($id)
{
}
protectedfunctiondelFromDbAll()
{
}
///////////////////////////////////////////////////////////////////////////
}