PHPackages                             ajur-media/fsnews.stats - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ajur-media/fsnews.stats

ActiveLibrary

ajur-media/fsnews.stats
=======================

FSNews Engine NViews collector

0.99.1(1y ago)0184MITPHPPHP ^7.4 | 8.\*

Since Oct 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ajur-media/fsnews.stats)[ Packagist](https://packagist.org/packages/ajur-media/fsnews.stats)[ RSS](/packages/ajur-media-fsnewsstats/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

FSNews Engine NViews collector
==============================

[](#fsnews-engine-nviews-collector)

Библиотека работает с SQL-таблицей следующего (минимального) вида:

```
CREATE TABLE example (
    item_id int DEFAULT NULL,
    event_date date DEFAULT NULL,
    event_count int DEFAULT NULL,
    UNIQUE KEY uniq_id_eventdate (item_id, event_date)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='visit log';
```

Впрочем, уникальный ключ может быть сложнее и покрывать какие-то дополнительные поля (например, `is_external`). Это минимальная необходимая структура:

- id материала
- дата события
- количество событий на дату и материал

```
use AJUR\FSNews\NViews;

require_once __DIR__ . '/vendor/autoload.php';

// bootstrapping

// connect to database
$pdo = new \Arris\Database\DBWrapper([
    'driver'    =>  'mysql',
    'hostname'  =>  'localhost',
    'username'  =>  'wombat',
    'password'  =>  'wombatsql',
    'database'  =>  '47news',
    'charset'   =>  'utf8',
    'charset_collate'   =>  'utf8_general_ci',
    'slow_query_threshold'  => 1
]);

NViews::init($pdo /* default values */); // connection may be null, then required at addStream()
NViews::addStream('unique', $pdo, 'stat_nviews_full'); // connection may be null, default from init() will be used

// somewhere below in the code

NViews::stream('unique')->addEvent(239418);

// anywhere

$data = NViews::stream('unique')->getEvents(239418);
var_dump($data);
```

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~102 days

Total

4

Last Release

571d ago

PHP version history (2 changes)0.1.0PHP ^7.4

0.99.0PHP ^7.4 | 8.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d4a5bbb45fc701f595e17c74b94658126704ebc4eafb3fb1aa8bc613cdcbbbd?d=identicon)[KarelWintersky](/maintainers/KarelWintersky)

---

Top Contributors

[![KarelWintersky](https://avatars.githubusercontent.com/u/2164874?v=4)](https://github.com/KarelWintersky "KarelWintersky (2 commits)")

### Embed Badge

![Health badge](/badges/ajur-media-fsnewsstats/health.svg)

```
[![Health](https://phpackages.com/badges/ajur-media-fsnewsstats/health.svg)](https://phpackages.com/packages/ajur-media-fsnewsstats)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
