PHPackages                             germania-kg/websites - 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. germania-kg/websites

ActiveLibrary

germania-kg/websites
====================

4.2.2(4y ago)0346[1 issues](https://github.com/GermaniaKG/Websites/issues)1MITPHPPHP ^5.6|^7.0|^8.0CI failing

Since Nov 2Pushed 4y ago2 watchersCompare

[ Source](https://github.com/GermaniaKG/Websites)[ Packagist](https://packagist.org/packages/germania-kg/websites)[ RSS](/packages/germania-kg-websites/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (28)Used By (1)

Germania KG · Websites
======================

[](#germania-kg--websites)

\**This package was destilled from legacy code and is deprecated.*
You better do not want it to use this in production.

[![Packagist](https://camo.githubusercontent.com/4f352f1c06172e79e589b5769c3f13dcb83d2373d3485f1e2fb91c0b92dfb65d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765726d616e69612d6b672f77656273697465732e7376673f7374796c653d666c6174)](https://packagist.org/packages/germania-kg/websites)[![PHP version](https://camo.githubusercontent.com/097634a17b822eef79955031534eedaddaad7547eaa6fed713286270f819a919/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6765726d616e69612d6b672f77656273697465732e737667)](https://packagist.org/packages/germania-kg/websites)[![Build Status](https://camo.githubusercontent.com/9ce8542bf76b2c635d9a7756b7b2225bc04ef7c515fef4a1aa29ee32503ab74e/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4765726d616e69614b472f57656273697465732e7376673f6c6162656c3d5472617669732532304349)](https://travis-ci.org/GermaniaKG/Websites)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b910d67ee567d85b82051d080bccb9b5712f155131277bc6961626e1fb401470/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f57656273697465732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/Websites/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/db53c8f3cd0407af1bd02ee2269152f4693b60dd3ef3e4493fa1e9cab121ae88/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f57656273697465732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/Websites/?branch=master)[![Build Status](https://camo.githubusercontent.com/be4e6fb37ee664631b956c161adf1ac0c3d3d91a4b91a98e3dc7890dd47149a4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f57656273697465732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/Websites/build-status/master)

Upgrade notes
-------------

[](#upgrade-notes)

### Upgrading from v2

[](#upgrading-from-v2)

**Database:** There is a new field *route\_name.* See `sql/install.sql.txt` on how to create or add the fields.

Classes **PdoAllWebsites** and **PdoRouteWebsiteFactory:** Passing the pages table name to constructor is now mandatory.

### Upgrading from v1

[](#upgrading-from-v1)

There are two new database fields **javascripts** and **stylesheets.** See `sql/install.sql.txt` on how to create or add the fields.

According to this, interface *WebsiteInterface* prescribes two methods **getJavascripts** and **getStylesheets**, its implementation class *Website* additionally introduces **setJavascripts** and **setStylesheets**.

Installation with Composer
--------------------------

[](#installation-with-composer)

```
$ composer require germania-kg/websites
```

**MySQL:** When working with database, create your tables using the CREATE TABLE statements in `sql/install.sql.txt`.

All Websites
------------

[](#all-websites)

The interface **WebsitesInterface** extends *IteratorAggregate, Countable* and the [PSR-11](https://github.com/php-fig/container) *ContainerInterface.*

Class **Websites** implements *WebsitesInterface* and thus can be iterated over and ‘counted’. The **PdoAllWebsites** class is an extension that reads from a MySQL Table.

```

```

Get a website by route
----------------------

[](#get-a-website-by-route)

```
