php8.5
Home/ Manual/ reference / yaf/ The Yaf_Registry class

The Yaf_Registry class

Yaf_Registry is a global key-value store. All of its methods are static, which makes it universally accessible, and provides the ability to get or set any custom data from anywhere in your code as necessary.

Intro

Yaf_Registry is a global key-value store. All of its methods are static, which makes it universally accessible, and provides the ability to get or set any custom data from anywhere in your code as necessary.

It is typically used to hold objects initialized in the Bootstrap (a database connection, a logger, shared configuration) so that controllers, actions and plugins can retrieve them without passing them around.

Class synopsis

class Yaf_Registry { }

Properties

_instance
_entries

Yaf-registry

Source: reference/yaf/yaf-registry.xml · from the official PHP manual (php/doc-en)