File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/BudgetRecommendationQuery.php.tar
httpdocs/wp-content/plugins/google-listings-and-ads/src/DB/Query/BudgetRecommendationQuery.php 0000644 00000002355 15155204244 0035054 0 ustar 00 var/www/vhosts/uyarreklam.com.tr <?php
declare( strict_types=1 );
namespace Automattic\WooCommerce\GoogleListingsAndAds\DB\Query;
use Automattic\WooCommerce\GoogleListingsAndAds\DB\Query;
use Automattic\WooCommerce\GoogleListingsAndAds\DB\Table\BudgetRecommendationTable;
use Automattic\WooCommerce\GoogleListingsAndAds\Exception\InvalidQuery;
use wpdb;
defined( 'ABSPATH' ) || exit;
/**
* Class BudgetRecommendationQuery
*
* @package Automattic\WooCommerce\GoogleListingsAndAds\DB\Query
*/
class BudgetRecommendationQuery extends Query {
/**
* BudgetRecommendationQuery constructor.
*
* @param wpdb $wpdb
* @param BudgetRecommendationTable $table
*/
public function __construct( wpdb $wpdb, BudgetRecommendationTable $table ) {
parent::__construct( $wpdb, $table );
}
/**
* Sanitize a value for a given column before inserting it into the DB.
*
* @param string $column The column name.
* @param mixed $value The value to sanitize.
*
* @return mixed The sanitized value.
* @throws InvalidQuery When the code tries to set the ID column.
*/
protected function sanitize_value( string $column, $value ) {
if ( 'id' === $column ) {
throw InvalidQuery::cant_set_id( BudgetRecommendationTable::class );
}
return $value;
}
}