Yaf_Registry::del
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Remove an item from registry
Description
Yaf_Registry::del(string $name): bool
Removes an entry from the registry. Removing a name that does not exist is silently accepted.
Parameters
nameThe name of the registry entry.
Return Values
Always returns true.
Examples
Yaf_Registry::del example
php
<?php
Yaf_Registry::set("redis", new Redis());
var_dump(Yaf_Registry::has("redis"));
var_dump(Yaf_Registry::del("redis"));
var_dump(Yaf_Registry::has("redis"));
/* deleting a missing entry is silently accepted */
var_dump(Yaf_Registry::del("redis"));
?>The above example will output something similar to:
output
bool(true)
bool(true)
bool(false)
bool(true)See Also
Yaf_Registry::getYaf_Registry::setYaf_Registry::has