Registers a registry

@param string  $name
@param string  $className
@param boolean $replace
328905
public static function registerRegistry(string $name, string $className, bool $replace = false)
    {
        if (!array_key_exists($name, self::$registries) or $replace) {
            self::$registries[$name] = $className;
        }
    }
456088
protected function registerPlugin($name)
    {
        $view = $this->getView();

        MaterializePluginAsset::register($view);

        $id = $this->options['id'];

        if ($this->clientOptions !== false) {
            $options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
            $js = "jQuery('#$id').$name($options);";
            $view->registerJs($js);
        }

        $this->registerClientEvents();
    }
39993
function register($name, $creation, $validation = null){
        $db = &$this->db;
        $registration = &$this->registration;

        if(!$validation){
            $validation = function(){ return true; };
        }

        $this->registration[$name] = $this->db[$name] = function($validate = true) use($name,$creation,$validation,&$db,&$registration){
            $r = $creation();
            $db[$name] = function() use($r, $name, $validation, &$registration, $validate) {
                if(!$validate || $validation($r)) {
                    return $r;
                }
                $r = $registration[$name];
                $r = $r(false);
                return $r;
            };
            return $r;
        };
    }
1344060
public static function remove($name)
    {
        exception_if(!static::exists($name), SessionKeyNotFoundException::class, $name);
        //
        static::$register[$name] = null;

        static::save();

        return true;
    }
611770
public static function registerNamespace($namespace, $path, $classname = null)
    {
        $namespace = trim($namespace, '\\');
        $path = rtrim($path, '/\\');

        $loader = function ($classname, $return_filename = false) use ($namespace, $path) {
            if (class_exists($classname, false) || interface_exists($classname, false)) {
                return true;
            }

            $classname = trim($classname, '\\');

            if ($namespace && stripos($classname, $namespace) !== 0) {
                return false;
            } else {
                $filename = trim(substr($classname, strlen($namespace)), '\\');
            }

            $filename = $path . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $filename) . '.php';

            if ($return_filename) {
                return $filename;
            } else {
                if (!file_exists($filename)) {
                    return false;
                }

                require $filename;

                return class_exists($classname, false) || interface_exists($classname, false);
            }
        };

        if ($classname === null) {
            spl_autoload_register($loader);
        } else {
            return $loader($classname, true);
        }
    }
1010604
public function register() {
		if ($this->registered) {
			require_once __DIR__ . '/Exceptions/RegisterationFailed.php';
			throw new RegistrationFailed('Is already registered');
		}
		
		if ($this->namespaces->isEmpty()) {
			require_once __DIR__ . '/Exceptions/RegisterationFailed.php';
			throw new RegistrationFailed('No namespaces was registered');
		}
		
		spl_autoload_register(function($class) {
			foreach ($this->namespaces as $definition) {
				if (strpos($class, $definition->namespace) === 0) {
					$resolvedClass = substr($class, strlen($definition->namespace));
					
					if ($this->loadClass($resolvedClass, $definition->dirs)) {
						return;
					}
				}
			}
			
			if (! $this->dirs->isEmpty()) {
				$this->loadClass('\\' . $class, $this->dirs);
			}
		});
		
		$this->registered = true;
	}
744207
protected function registerBlade($name)
    {
        $this->blade->extend(function ($view, $compiler) use ($name) {
            $pattern = $this->createMatcher($name);

            $replace = '$1<?php echo Widget::'.$name.'$2; ?>';

            return preg_replace($pattern, $replace, $view);
        });
    }
85732
static function register( $dataTypeString, $className )
    {
        $types =& $GLOBALS["eZDataTypes"];
        if ( !is_array( $types ) )
            $types = array();
        $types[$dataTypeString] = $className;
    }
134633
public static function registerElement($type, $className, $includeFile = null)
    {
        self::$elementTypes[strtolower($type)] = array($className, $includeFile);
    }
624741
public boolean register(E e, String name) {
        if (resolve.containsKey(name)) {
            return false;
        }
        resolve.put(name, e);
        rev.put(e, name);
        return true;
    }
715260
protected function registerAdapter($name, $classOrFactory)
    {
        $this
            ->define($name, function($config = []) use($classOrFactory) {
                $factory = is_object($classOrFactory) ? $classOrFactory : new $classOrFactory();

                return $factory->create([ $config ]);
            })
        ;
    }
1179
public function registerHelper($name, $helper = false)
    {
        if (is_array($name)) {
            foreach ($name as $n => $helper) {
                $this->registerHelper($n, $helper);
            }
        } elseif (is_object($name)) {
            $this->registerJavascriptObject('helper', $this->wrapHelperObject($name));
        } elseif ($helper === false) {
            $this->registerJavascriptObject('helper', $name);
        } elseif (is_callable($helper)) {
            $this->registerJavascriptFunction('helper', $name, $this->wrapHelperCallable($name, $helper));
        } else {
            $this->registerJavascriptFunction('helper', $name, $helper);
        }
    }
929337
public function registerCollectorClass($className)
    {
        /** @var CollectorInterface $collector */
        $collector = new $className($this->context->getProcess(), $this->datasource);
        $this->registerCollector($collector);
    }
777445
public static function registerDriver($name, $clz) {
        if (is_subclass_of($clz, StorageDriver::class)) {
            self::$IMPLS[ $name ] = $clz;

            return true;
        }

        return false;
    }
940025
protected function registerPlugin($name)
    {
        $view = $this->getView();

        BootstrapPluginAsset::register($view);

        $id = $this->options['id'];

        if ($this->clientOptions !== false) {
            $options = empty($this->clientOptions) ? '' : Json::htmlEncode($this->clientOptions);
            $js = "jQuery('#$id').$name($options);";
            $view->registerJs($js);
        }

        $this->registerClientEvents();
    }
63335
public static function register( $name, $callback = null, $sanitizer = null ) {
		unset( static::$resolved[ $name ] );

		if ( $callback instanceof Field_Type ) {
			$instance = $callback;

			list( $callback, $sanitizer ) = [
				[ $instance, 'display' ],
				[ $instance, 'sanitization' ],
			];

			static::$instances[ $name ] = $instance;
		}

		static::$bindings[ $name ] = compact( 'callback', 'sanitizer' );
	}
948109
public function registerDriverElement(string $name, ElementInterface $element, string $driver_name)
    {
        $this->getDriver($driver_name, 'skip bootstrap')->registerElement($name, $element);
    }