Skip to content

Widgets toolkit (producer, provider, consumer), mechanism description and examples

License

Notifications You must be signed in to change notification settings

php-strict/widgets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Widgets

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.

About

Widgets toolkit (producer, provider, consumer), mechanism description and examples

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages