mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-25 00:05:29 +00:00
b3f948c59c
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0 * php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0 Change-Id: I4b2fb7f46b6c0a5c33a6ad25f085de8ae13eb084
33 lines
618 B
PHP
33 lines
618 B
PHP
<?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_PRIMARY );
|
|
|
|
$row = $targetPage->toDbArray();
|
|
|
|
$dbw->insert( 'echo_target_page', $row, __METHOD__ );
|
|
|
|
return true;
|
|
}
|
|
}
|