Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors\Transformers
Count::transform()
Count elements in Array or Countable object.
@param array|Countable $value an array to count. @param stdClass|null $arguments arguments. @param string|null $default_value default value.
@return number
Метод класса: Count{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Count = new Count(); $Count->transform( $value, ?stdClass $arguments, $default_value );
- $value (обязательный)
- -
- ?stdClass $arguments **
- -
По умолчанию: null - $default_value **
- -
По умолчанию: null
Код Count::transform() Count::transform WC 9.7.1
public function transform( $value, ?stdClass $arguments = null, $default_value = null ) { if ( ! is_array( $value ) && ! $value instanceof \Countable ) { return $default_value; } return count( $value ); }