PHPackages                             it-studio/centralnews - 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. it-studio/centralnews

ActiveLibrary

it-studio/centralnews
=====================

API knihovna pro praci se systemem CentralNews

v1.0(10y ago)063PHP

Since Aug 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/it-studio/centralnews)[ Packagist](https://packagist.org/packages/it-studio/centralnews)[ RSS](/packages/it-studio-centralnews/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

CentralNews API
===============

[](#centralnews-api)

API knihovna pro práci se systémem CentralNews.

Dokumentace implementace
------------------------

[](#dokumentace-implementace)

Připojení k CentralNews probíhá dle této dokumentace:

Instalace
=========

[](#instalace)

Composer: `composer require itstudiocz/centralnews-api-php`

Příklady použití
================

[](#příklady-použití)

Vytvoření instance klienta
--------------------------

[](#vytvoření-instance-klienta)

```
$params = array(
    CentralNews\Service\Client::URL => 'http://localhost',
    CentralNews\Service\Client::TOKEN => 'xxxxxxxxxxxxxxx',
    CentralNews\Service\Client::USER => 'user',
    CentralNews\Service\Client::PASSWORD => 'password',
);

$client = new CentralNews\Service\Client($params);

// proměnné použité dále v příkladech
$groupId = 1; // je číselný identifikátor skupiny (1,2, ..)
$email = "info@itstudio.cz"; // je platná emailová adresa
```

Vytvoření nové odběratelské skupiny
-----------------------------------

[](#vytvoření-nové-odběratelské-skupiny)

```
$newGroup = new CentralNews\Entity\SubscriberGroup();
$newGroup->setName('New Group');
$newGroup->setDescription('description');

$subscriberManager = $client->getSubscriberManager();
$subscriberManager->addGroup($newGroup);
```

Výpis odběratelských skupin
---------------------------

[](#výpis-odběratelských-skupin)

```
$subscriberManager = $client->getSubscriberManager();
$groups = $subscriberManager->getGroups();
```

Počet odběratelů
----------------

[](#počet-odběratelů)

- počet všech

```
$subscriberManager = $client->getSubscriberManager();
$count = $subscriberManager->getSubscribersCount();
```

- počet ve skupině

```
$subscriberManager = $client->getSubscriberManager();
$group = new \CentralNews\Entity\Group($groupId);
$count = $subscriberManager->getSubscribersCount($group);
```

Informace o odběrateli
----------------------

[](#informace-o-odběrateli)

```
$group = new \CentralNews\Entity\Group($groupId);
$subscriberManager = $client->getSubscriberManager();
$subscriber = $subscriberManager->getSubscriber($email, $group);
```

Položky odběratele
------------------

[](#položky-odběratele)

- všechny

```
$subscriberManager = $client->getSubscriberManager();
$data = $subscriberManager->getSubscriberFields();
```

- ve skupině

```
$subscriberManager = $client->getSubscriberManager();
$group = new \CentralNews\Entity\Group($groupId);
$data = $subscriberManager->getSubscriberFields($group);
```

Vymazání odběratele ze skupiny
------------------------------

[](#vymazání-odběratele-ze-skupiny)

```
$group = new \CentralNews\Entity\Group($groupId);
$subscriberManager = $client->getSubscriberManager();
$subscriberManager->deleteSubscriber($email, $group);
```

Přidání odběratelů
------------------

[](#přidání-odběratelů)

- když existují, aktualizují se jejich údaje

```
$subscribers[] = new CentralNews\Entity\Subscriber($email);
$group = new CentralNews\Entity\Group($groupId);
$subscriberManager = $client->getSubscriberManager();
$subscriberManager->saveSubscribers($subscribers, $group);
```

- když odběratel existuje, přeskočí se (neaktualizuje se)

```
$subscribers[] = new CentralNews\Entity\Subscriber($email);
$group = new CentralNews\Entity\Group($groupId);
$subscriberManager = $client->getSubscriberManager();
$subscriberManager->importSubscribers($subscribers, $group);
```

Událost - opuštěný košík
------------------------

[](#událost---opuštěný-košík)

```
$eventManager = $client->getEventManager();
$lostCart = new \CentralNews\Entity\LostCart();
$lostCart->setEmail($email);
$product = new CentralNews\Entity\Product();
$product->setName('product name');
$product->setPrice(100);
$lostCart->addProduct($product);
$eventManager->callLostCart($lostCart);
```

Odeslání vlastního požadavku
----------------------------

[](#odeslání-vlastního-požadavku)

```
$manager = $client->getManager();
$request = new CentralNews\Service\Request($operation, $params);
$response = $manager->sendRequest($request);
```

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~112 days

Total

2

Last Release

3767d ago

Major Versions

v0.1 → v1.02015-11-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec454245baeead12e53cd3715e85a4d29bcdbff580e71d28f9be4fcff8189812?d=identicon)[itstudiocz](/maintainers/itstudiocz)

---

Top Contributors

[![ctvrtlik](https://avatars.githubusercontent.com/u/1597731?v=4)](https://github.com/ctvrtlik "ctvrtlik (1 commits)")[![itstudiocz](https://avatars.githubusercontent.com/u/13049590?v=4)](https://github.com/itstudiocz "itstudiocz (1 commits)")[![pierotto](https://avatars.githubusercontent.com/u/46345782?v=4)](https://github.com/pierotto "pierotto (1 commits)")

### Embed Badge

![Health badge](/badges/it-studio-centralnews/health.svg)

```
[![Health](https://phpackages.com/badges/it-studio-centralnews/health.svg)](https://phpackages.com/packages/it-studio-centralnews)
```

###  Alternatives

[noiselabs/nusoap-bundle

Symfony2 bundle for NuSOAP - SOAP Toolkit for PHP

21534.3k](/packages/noiselabs-nusoap-bundle)[and/gls-shipping-api

GLS Shipping &amp; Tracking API

1310.4k](/packages/and-gls-shipping-api)

PHPackages © 2026

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