Skip to content

clean/registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clean\Registry

Build Status Code Climate Test Coverage Issue Count

Basic implementation of registry pattern that implement a central storage for objects often used throughout the application.

Installation

via Composer:

"require": {
  "clean/registry": "*"
}

Example of Usage

$registry = new Registry()

$registry->set('var1', 1);

$var1 = $registry->get('var1');

if ($registry->has('var1')) {
    ...
}

or you can extend any class with ReigistryTrait to add registry methods to it

class MyClass {
	use \Clean\Registry\RegistryTrait;
}

About

Implementation of registry pattern

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages