Ratings
extends RowGateway
in package
implements
RatingsEntityInterface, DbTableAwareInterface, DbServiceAwareInterface
Uses
DbTableAwareTrait, DbServiceAwareTrait
Row Definition for ratings
Tags
Interfaces, Classes, Traits and Enums
- RatingsEntityInterface
- Entity model interface for ratings table
- DbTableAwareInterface
- Marker interface for classes that depend on the \VuFind\Db\Table\PluginManager
- DbServiceAwareInterface
- Marker interface for classes that depend on the \VuFind\Db\Service\PluginManager
Table of Contents
- $created : string
- $id : int
- $rating : int
- $resource_id : int
- $user_id : int
- $dbServiceManager : PluginManager
- Database service plugin manager
- $tableManager : PluginManager
- Database table plugin manager
- __construct() : mixed
- Constructor
- getCreated() : DateTime
- Get created date.
- getDbService() : T
- Get a database service object.
- getDbServiceManager() : PluginManager
- Get the service plugin manager. Throw an exception if it is missing.
- getDbTable() : Gateway
- Get a database table object.
- getDbTableManager() : PluginManager
- Get the table plugin manager. Throw an exception if it is missing.
- getId() : int|null
- Get identifier (returns null for an uninitialized or non-persisted object).
- getPrimaryKeyColumn() : array<string|int, mixed>
- Retrieve primary key information.
- getRating() : int
- Get rating.
- getResource() : ResourceEntityInterface
- Get resource.
- getUser() : UserEntityInterface|null
- Get user.
- setCreated() : RatingsEntityInterface
- Set created date.
- setDbServiceManager() : void
- Set the service plugin manager.
- setDbTableManager() : void
- Set the table plugin manager.
- setRating() : RatingsEntityInterface
- Set rating.
- setResource() : RatingsEntityInterface
- Set resource.
- setUser() : RatingsEntityInterface
- Set user.
Properties
$created
public
string
$created
$id
public
int
$id
$rating
public
int
$rating
$resource_id
public
int
$resource_id
$user_id
public
int
$user_id
$dbServiceManager
Database service plugin manager
protected
PluginManager
$dbServiceManager
$tableManager
Database table plugin manager
protected
PluginManager
$tableManager
Methods
__construct()
Constructor
public
__construct(Adapter $adapter) : mixed
Parameters
- $adapter : Adapter
-
Database adapter
Return values
mixed —getCreated()
Get created date.
public
getCreated() : DateTime
Return values
DateTime —getDbService()
Get a database service object.
public
getDbService(class-string<\VuFind\Db\Service\T> $name) : T
Parameters
- $name : class-string<\VuFind\Db\Service\T>
-
Name of service to retrieve
Tags
Return values
T —getDbServiceManager()
Get the service plugin manager. Throw an exception if it is missing.
public
getDbServiceManager() : PluginManager
Tags
Return values
PluginManager —getDbTable()
Get a database table object.
public
getDbTable(string $table) : Gateway
Parameters
- $table : string
-
Table to load.
Return values
Gateway —getDbTableManager()
Get the table plugin manager. Throw an exception if it is missing.
public
getDbTableManager() : PluginManager
Tags
Return values
PluginManager —getId()
Get identifier (returns null for an uninitialized or non-persisted object).
public
getId() : int|null
Return values
int|null —getPrimaryKeyColumn()
Retrieve primary key information.
public
getPrimaryKeyColumn() : array<string|int, mixed>
Return values
array<string|int, mixed> —getRating()
Get rating.
public
getRating() : int
Return values
int —getResource()
Get resource.
public
getResource() : ResourceEntityInterface
Return values
ResourceEntityInterface —getUser()
Get user.
public
getUser() : UserEntityInterface|null
Return values
UserEntityInterface|null —setCreated()
Set created date.
public
setCreated(DateTime $dateTime) : RatingsEntityInterface
Parameters
- $dateTime : DateTime
-
Created date
Return values
RatingsEntityInterface —setDbServiceManager()
Set the service plugin manager.
public
setDbServiceManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager
Return values
void —setDbTableManager()
Set the table plugin manager.
public
setDbTableManager(PluginManager $manager) : void
Parameters
- $manager : PluginManager
-
Plugin manager
Return values
void —setRating()
Set rating.
public
setRating(int $rating) : RatingsEntityInterface
Parameters
- $rating : int
-
Rating
Return values
RatingsEntityInterface —setResource()
Set resource.
public
setResource(ResourceEntityInterface $resource) : RatingsEntityInterface
Parameters
- $resource : ResourceEntityInterface
-
Resource
Return values
RatingsEntityInterface —setUser()
Set user.
public
setUser(UserEntityInterface|null $user) : RatingsEntityInterface
Parameters
- $user : UserEntityInterface|null
-
User