Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Registry extends \ArrayObject
public function __construct()
{
throw new Exception(
'Cannot instance the %s object. Use set, get, remove ' .
'Cannot instance the %s object. Use set, get, store, remove ' .
'and isRegistered static methods instead.',
0,
__CLASS__
Expand Down Expand Up @@ -103,6 +103,20 @@ public static function set($index, $value)
return;
}

/**
* Set a new multiple register
* @access public
* @param array $contain
* @return void
*/
public static function store(array $contain) {

foreach ($contain as $index => $value) {
static::getInstance()->offsetSet($index, $value);
}
return;
}

/**
* Get a registry.
*
Expand Down