php-strict/widgets

Widgets examples repository.

dev-master 2019-05-29 08:54 UTC

This package is auto-updated.

Last update: 2024-05-29 03:57:31 UTC


README

Software License

Widgets mechanism allow 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 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 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

Widgets on web-site other page

Requirements

  • PHP >= 7.1

Install

Install with Composer:

  • widgets consumer
composer require php-strict/widgets-consumer
  • widgets provider
composer require php-strict/widgets-provider
  • widgets producer
composer require php-strict/widgets-producer

Usage

See examples in src dir.