Methods

getAverage()

getAverage() : int

Calculates the average rating value.

Returns

int

notEmpty()

notEmpty(string $property, array $args) : bool

Checks, wether a property is not empty.

Uses the getter method of the property to fetch its value, passing the $args to the method.

A property is considered empty, if its value

  • is null,
  • is a scalar and \empty() returns true,
  • is an empty array, or
  • is an object implementing \Countable and ::count() is 0.

in all other cases the property is considered to be not empty.

Parameters

string $property
array $args

Arguments to be passed to the getter method.

Throws

\Core\Entity\Exception\OutOfBoundsException

if the property does not exists.

Returns

bool

hasProperty()

hasProperty(string $property, bool|string $mode) : bool

Checks, if this entity has a property.

The property must be defined, and additionally one of the following condition must be met, dependent on $mode:

  • self::PROPERTY_STRICT: A getter AND a setter method must be available.
  • self::PROPERTY_GETTER: Only a getter must be available.
  • self::PROPERTY_SETTER: Only a setter must be available.
  • self::PROPERTY_FACILE: No additional conditions.

Parameters

string $property
bool|string $mode

Returns

bool

getRating()

getRating() : int

Gets the rating for an application

Returns

int