Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/php-strict/widgets
Widgets toolkit (producer, provider, consumer), mechanism description and examples
https://github.com/php-strict/widgets
php php-library php7 widget widget-library widget-toolkit widgets
Last synced: 23 days ago
JSON representation
Widgets toolkit (producer, provider, consumer), mechanism description and examples
- Host: GitHub
- URL: https://github.com/php-strict/widgets
- Owner: php-strict
- License: gpl-3.0
- Created: 2019-04-27T06:31:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-29T08:54:30.000Z (over 5 years ago)
- Last Synced: 2023-07-15T16:57:35.959Z (over 1 year ago)
- Topics: php, php-library, php7, widget, widget-library, widget-toolkit, widgets
- Language: PHP
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Widgets
[![Software License][ico-license]](LICENSE.txt)
Widgets mechanism allow [widgets consumer](https://github.com/php-strict/widgets-consumer)
gets widgets from widgets provider and place any widgets in predefined places.
Widgets consumer ask widgets provider for widgets for specific scope/place,
throught provider public interface. Or widgets provider can take consumer-object
as parameter and inject widgets into it. For this purposes widgets consumer
define public methods to gets current scope and all places for current scope.[Widgets providers](https://github.com/php-strict/widgets-provider)
works with widgets data storage. Widgets data storage
stores information about widgets scope, place and some widget type
dependent parameters. Widgets provider refers to the widgets producers,
that are encapsulated in widgets data, for creating the widgets.[Widgets producer](https://github.com/php-strict/widgets-producer)
takes widgets data and create widget. Widgets
producer may be a standalone (weather, currency, ...), or a part of
some module (for example - last news for news module).![Widgets on web-site mainpage](https://raw.githubusercontent.com/php-strict/widgets/master/img/workflow.svg?sanitize=true)
![Widgets on web-site other page](https://raw.githubusercontent.com/php-strict/widgets/master/img/workflow2.svg?sanitize=true)
## Requirements
* PHP >= 7.1
## Install
Install with [Composer](http://getcomposer.org):
* widgets consumer
```bash
composer require php-strict/widgets-consumer
```* widgets provider
```bash
composer require php-strict/widgets-provider
```* widgets producer
```bash
composer require php-strict/widgets-producer
```## Usage
See examples in [src](https://github.com/php-strict/widgets/tree/master/src) dir.
[ico-license]: https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat-square