mambax7/publisher

View on GitHub
class/RatingHandler.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php declare(strict_types=1);

namespace XoopsModules\Publisher;

/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */
/**
 *  Publisher class
 *
 * @copyright       XOOPS Project (https://xoops.org)
 * @license         https://www.fsf.org/copyleft/gpl.html GNU public license
 * @since           1.0
 * @author          trabis <lusopoemas@gmail.com>
 */
require_once \dirname(__DIR__) . '/include/common.php';

/**
 * Class RatingHandler
 */
class RatingHandler extends \XoopsPersistableObjectHandler
{
    private const TABLE      = 'publisher_rating';
    private const ENTITY     = Rating::class;
    private const KEYNAME    = 'ratingid';
    private const IDENTIFIER = 'itemid';

    /**
     * RatingHandler constructor.
     */
    public function __construct(\XoopsDatabase $db = null)
    {
        $this->db = $db;
        parent::__construct($db, static::TABLE, static::ENTITY, static::KEYNAME, static::IDENTIFIER);
    }
}