Gc\Registry::get PHP Method

get() public static method

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 get ( string $index ) : mixed
$index string - get the value associated with $index
return mixed
    public static function get($index)
    {
        $instance = self::getInstance();
        if (!$instance->offsetExists($index)) {
            throw new RuntimeException("No entry is registered for key '{$index}'");
        }
        return $instance->offsetGet($index);
    }

Usage Example

Example #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testInvokeUnsecure()
 {
     $coreConfig = Registry::get('Application')->getServiceManager()->get('CoreConfig');
     $basePath = $coreConfig->setValue('force_backend_ssl', 0);
     $basePath = $coreConfig->setValue('unsecure_cdn_base_path', 'http://got-cms.com');
     $this->assertEquals('http://got-cms.com/test', $this->object->__invoke('test'));
 }
All Usage Examples Of Gc\Registry::get