Navigation Menu

Skip to content

Sinevia/php-library-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

PHP Library Registry

The Registry provides a safe implementation of an a registry store for variables, that can be used anywhere in the app.

It is a safe alternative of the $GLOBALS variable.

No Dependencies

Background

Installation

1. Via Composer

composer require sinevia/php-library-registry

2. Manually

Download from https://github.com/Sinevia/php-library-registry

Usage

1. Setting, retrieving, removing

\Sinevia\Registry::set('admin_email','admin@domain.com');

if (\Sinevia\Registry::has('admin_email')) { 
    echo \Sinevia\Registry::get('admin_email');
}

\Sinevia\Registry::remove('admin_email');

2. Default value

$title = \Sinevia\Registry::get('title', 'Undefined');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages