Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: Yaf_Registry - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Yaf_Registry

2025-05-31

Yaf_Registry 类

(Yaf >=1.0.0)

简介

Yaf_Registry 的所有方法都声明为静态,使其可以随地访问。这提供了根据需要从代码中获取/设置任何自定义数据的能力。 对象注册表(或称对象仓库)是一个用于在整个应用空间(application space)内存储对象和值的容器. 通过把对象存储在其中,我们可以在整个项目的任何地方使用同一个对象。这种机制相当于一种全局存储。另外,由于该类是一个数组对象,你可以使用数组形式来访问其中的类方法。

类摘要

class Yaf_Registry {
/* 属性 */
static $_instance;
protected $_entries;
/* 方法 */
private __construct()
public static del(string $name): void
public static get(string $name): mixed
public static has(string $name): bool
public static set(string $name, string $value): bool
}

属性

_instance

_entries

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/class.yaf-registry.php

冷却塔厂家 广告
中文GPT4.0无需注册 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3