Function Resource_fs_base->_default_property_int_modeavg

Definitions

sources/resource_fs_base_class.php

  • Find a default property, defaulting to the average of what is there already, or the given default if really necessary.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$properties array No No required parameter N/A N/A The properties
$property ID_TEXT No No required parameter N/A N/A The property
$table ID_TEXT No No required parameter N/A N/A The table to average within
$default integer No No required parameter N/A N/A The last-resort default
$db_property ?ID_TEXT No No Null N/A N/A The database property (null: same as $property)

Returns

  • The value
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find a default property, defaulting to the average of what is there already, or the given default if really necessary.
 *
 * @param  array $properties The properties
 * @param  ID_TEXT $property The property
 * @param  ID_TEXT $table The table to average within
 * @param  integer $default The last-resort default
 * @param  ?ID_TEXT $db_property The database property (null: same as $property)
 * @return integer The value
 */

protected function _default_property_int_modeavg(array $properties, string $property, string $table, int $default, ?string $db_property = null) : int