blob: 33dd7bc5ba81c5e1c763cc0416263dc1891c59e5 (
plain)
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
|
<?php
/**
* Database mapper for EchoTargetPage model
*/
class EchoTargetPageMapper extends EchoAbstractMapper {
/**
* List of db fields used to construct an EchoTargetPage model
* @var string[]
*/
protected static $fields = [
'etp_page',
'etp_event'
];
/**
* Insert an EchoTargetPage instance into the database
*
* @param EchoTargetPage $targetPage
* @return bool
*/
public function insert( EchoTargetPage $targetPage ) {
$dbw = $this->dbFactory->getEchoDb( DB_MASTER );
$row = $targetPage->toDbArray();
$res = $dbw->insert( 'echo_target_page', $row, __METHOD__ );
return $res;
}
}
|