Gc\Registry::set PHP Метод

set() публичный статический Метод

This method can be called from an object of type Zendregistry, or it can be called statically. In the latter case, it uses the default static instance stored in the class.
public static set ( string $index, mixed $value ) : void
$index string The location in the ArrayObject in which to store the value.
$value mixed The object to store in the ArrayObject.
Результат void
    public static function set($index, $value)
    {
        $instance = self::getInstance();
        $instance->offsetSet($index, $value);
    }

Usage Example

Пример #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testOffsetExists()
 {
     $this->object->set('key', 'value');
     $this->assertTrue($this->object->isRegistered('key'));
 }
All Usage Examples Of Gc\Registry::set