Skip to content

[Registry] New Component and Contract - #226

Merged
JoshuaEstes merged 3 commits into
SonsOfPHP:mainfrom
JoshuaEstes:registry
Sep 12, 2024
Merged

[Registry] New Component and Contract#226
JoshuaEstes merged 3 commits into
SonsOfPHP:mainfrom
JoshuaEstes:registry

Conversation

@JoshuaEstes

@JoshuaEstes JoshuaEstes commented Sep 12, 2024

Copy link
Copy Markdown
Member

Description

This component allows developers to registry services based on an identifier.

Example:

$registry = new Registry('stdClass');
$registry->register('example.identifier', new stdClass());
// Throws Exception
$registry->register('another.identifier', 'not an object and does not implement/extend stdClass');

$service = $registry->get('example.identifier');

Checklist

  • Updated CHANGELOG files
  • Updated Documentation
  • Unit Tests Created
  • php-cs-fixer

@JoshuaEstes
JoshuaEstes requested a review from a team as a code owner September 12, 2024 03:26
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 12, 2024
@JoshuaEstes
JoshuaEstes merged commit afa1bca into SonsOfPHP:main Sep 12, 2024
@JoshuaEstes
JoshuaEstes deleted the registry branch September 12, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant