Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Plugin_Abstract::routerStartupYaf_Registry::__construct>
^YafLast updated: Mon, 26 Oct 2026

The Yaf_Registry class

(Yaf >=1.0.0)

Introduction

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 */
static $_instance;
protected $_entries;
/* Methods */
privatefunction __construct()
public static function del(string $name): bool
public static function get(string $name): mixed
public static function has(string $name): bool
public static function set(string $name, mixed $value): bool
}

Properties

_instance

_entries

Table of Contents


<Yaf_Plugin_Abstract::routerStartupYaf_Registry::__construct>
^YafLast updated: Mon, 26 Oct 2026