count

@param mixed $value

@access public
@return int
340694
public function countValue($value)
    {
        return count(array_filter($this->data, function ($item) use ($value) {
            return $value === $item;
        }));
    }
1125063
public static function minCount($value, int $minCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        return count($value) >= $minCount;
    }
1371997
public function count()
    {
        return ( self::$assigned[$this->type] - self::START_AT + self::INCREMENT ) / self::INCREMENT;
    }
1135226
public function filter($value)
    {
        //string lub numer
        if (is_string($value) || is_numeric($value)) {
            return mb_strlen((string) $value, mb_detect_encoding($value));
        }
        //array
        if (is_array($value) || $value instanceof \ArrayObject) {
            return count($value);
        }
    }
671154
public function Count($param = '*'){
       $select = "select count($param)".$this->ProcessingTable();
       $sql = $this->StringSql($select);
       return (int) $this->query($sql)->one()["count($param)"];
   }
1121322
public function incrementMemberCount($value){
        if(!is_integer($value)){
            return $this;
        }
        $this->count_members = $this->count_members + $value;
        return $this;
    }
84834
public static function maxCount($value, int $maxCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        return count($value) <= $maxCount;
    }
347718
public function parseNumeric($value) {
    if (is_numeric($value)) {
      return $value + 0;
    }

    $exportValue = var_export($value, true);
    throw new ParseException("'$exportValue' could not be parsed as a number");
  }
1066012
public int count(String column, Object value) {
        return count(Operators.match(column, value));
    }
114630
public function execute($value)
    {
        if (!is_array($value) || count($value) != 2) {
            throw new \Exception('Value for number range comparison should have to values');
        }

        $queryBuilder = $this->getQueryBuilder();

        if (!empty($value[0])) {
            $queryBuilder->andHaving(
                $queryBuilder->expr()->gte(
                    $this->getIndex(),
                    ":{$this->getIndexClean()}_1"
                )
            )
                ->setParameter(
                    ":{$this->getIndexClean()}_1",
                    (float) $value[0]
                );
        }

        if (!empty($value[1])) {
            $queryBuilder->andHaving(
                $queryBuilder->expr()->lte(
                    $this->getIndex(),
                    ":{$this->getIndexClean()}_2"
                )
            )
                ->setParameter(
                    ":{$this->getIndexClean()}_2",
                    (float) $value[1]
                );
        }
    }
681549
public function count($conditions = null, $values = [])
    {
        $res = $this->executeQuery('COUNT(' . $this->key . ') AS num', $conditions, $values)
            ->fetch();
        return (isset($res->num) ? (int)$res->num : 0);
    }
531826
public function check($value, array $context = [])
    {
        $count = 0;

        foreach ($context as $field => $value) {
            if (in_array($field, $this->fields)) {
                $count++;
            }
        }

        return ($count === 1);
    }
1138381
public function append(string $value): int
    {
        return intval($this->handle->append($this->name, $value));
    }
696445
public function filter($value)
    {
        if (empty($value)) {
            return $value;
        }

        return number_format(floatval($value), $this->decimals, $this->decimalPoint, $this->thousandSeparator);
    }
737256
public function countValues(): int
    {
        $count = 0;

        foreach ($this->fields as $field) {
            $count += $field->count();
        }

        return $count;
    }
266454
public function isRequired($value)
    {
        if (is_null($value)) {
            return false;
        } elseif (is_string($value) && $value === '') {
            return false;
        } elseif ((is_array($value) || $value instanceof Countable) && count($value) < 1) {
            return false;
        }

        return true;
    }
553251
private function validatePageLimit($value): int
    {
        $ruleIndexes    = $this->serializerClass::readPageLimitRuleIndexes($this->getSerializedRuleSet());
        $validatedValue = $this->validatePaginationValue($value, $ruleIndexes);

        return $validatedValue;
    }