Returns the Queue Registry instance used for creating and using queue engines.
Also allows for injecting of a new registry instance.

@param \Cake\Core\ObjectRegistry|null $registry Injectable registry object.
@return \Cake\Core\ObjectRegistry
352963
public static function registry(ObjectRegistry $registry = null)
    {
        if ($registry) {
            static::$_registry = $registry;
        }

        if (empty(static::$_registry)) {
            static::$_registry = new QueueEngineRegistry();
        }

        return static::$_registry;
    }
1323233
public static function driverClass($identifier) {
		if (!isset(self::$registry[$identifier])) {
			return null;
		}

		return self::$registry[$identifier];
	}
934829
private function getRegistryRepository()
    {
        $repository = null;
        if (null !== $em = $this->_context->getApplication()->getEntityManager()) {
            $repository = $em->getRepository('BackBee\Bundle\Registry');
        }

        return $repository;
    }
252041
public static function setInstance(\Nf\Registry $registry)
    {
        if (self::$_registry !== null) {
            #require_once 'Zend/Exception.php';
            throw new Exception('Registry is already initialized');
        }

        self::$_registry = $registry;
    }
557821
public static function get(string $key)
    {
        if (!self::$instance) {
            return null;
        }

        return self::$instance->engine->get($key);
    }
699615
public function getRegistry($package = null)
    {
        if (isset($package)) {
            if ($this->registered($package)) {
                return $this->registry[ $package ];
            }

            return false;
        }

        return $this->registry;
    }
214463
public function register($key, $object)
	{
		$this->_registry[$key] = $this->_memoize($object);
		return $this;
	}
641382
public static function get($name)
    {
        $registry = static::getRegistry();

        if (isset($registry->{$name})) {
            return $registry->{$name};
        }

        static::_buildTransport($name);

        return $registry->{$name};
    }
370284
public static function get(Registry $registry, string $model): Workflow
    {
        $subject = static::fakeSubject();

        return $registry->get($subject, $model);
    }
336602
public function getRegisteredObject()
    {
        if($this->registeredObject == null)
        {
            $di = jaxon()->di();
            // Use the Reflection class to get the parameters of the constructor
            if(($constructor = $this->reflectionClass->getConstructor()) != null)
            {
                $parameters = $constructor->getParameters();
                $parameterInstances = [];
                foreach($parameters as $parameter)
                {
                    // Get the parameter instance from the DI
                    $parameterInstances[] = $di->get($parameter->getClass()->getName());
                }
                $this->registeredObject = $this->reflectionClass->newInstanceArgs($parameterInstances);
            }
            else
            {
                $this->registeredObject = $this->reflectionClass->newInstance();
            }
        }
        return $this->registeredObject;
    }
1097153
private function createLazyDefinition($registry, Definition $definition)
    {
        $lazy = new Definition(LazyRegistry::class, [
            new Reference('service_container'),
            new Reference($registry),
        ]);

        foreach ($definition->getMethodCalls() as $methodCall) {
            if ($methodCall[0] === 'offsetSet') {
                $methodCall[1][1] = (string) $methodCall[1][1];
                $lazy->addMethodCall('setLazy', $methodCall[1]);
            }
        }

        return $lazy;
    }
286013
protected function createRegistryDriver($name)
    {
        $config = Arr::get($this->config, "registry.{$name}", []);
        $cache  = $this->getCacheRepository($config);

        return $this->createProvider(Registry::getInstance($name, $config, $this->app, $cache));
    }
1361304
protected function fetchSearchRegistry( $requireFresh = false )
    {
        $location = $this->properties['location'];
        if ( !is_array( $this->searchRegistry ) )
        {
            $this->searchRegistry = array();
        }
        if ( !isset( $this->searchRegistry[$location] )
             || !is_array( $this->searchRegistry[$location] ) )
        {
            $this->searchRegistry[$location] = array();
        }

        // Makes sure the registry exists
        if ( empty( $this->searchRegistry[$location] )
             || $requireFresh === true )
        {
            $this->searchRegistry[$location] = $this->backend->fetch( $this->registryName . '_' . urlencode( $location ) );
        }
    }
1231104
public function get_registry() {
		if ( ! isset( $this->registry ) ) {
			$this->registry = new Default_Registry( $this->get_hyphenator_cache() );
		} elseif ( $this->update_registry_cache ) {
			$this->registry->update_hyphenator_cache( $this->get_hyphenator_cache() );
			$this->update_registry_cache = false;
		}

		return $this->registry;
	}
938281
public function get($name)
    {
        if (!isset($this->registry[$name])) {
            throw new RegistryException('Object with name "'.$name.'" is not registered');
        }

        return $this->registry[$name];
    }
395765
public static function getObjectManager(ManagerRegistry $registry, $entity, Constraint $constraint)
    {
        self::validateConstraint($constraint);
        /* @var UniqueEntity $constraint */

        return self::findObjectManager($registry, $entity, $constraint);
    }
1070115
protected static function getRegistry()
    {
        if (self::$registry === null) {
            self::$registry = Doozr_Registry::getInstance();
        }

        return self::$registry;
    }